netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Cheng <vincent.cheng.xh@renesas.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] ptp: Fix missing unlock on error in idtcm_probe()
Date: Wed, 6 Nov 2019 14:02:43 +0000	[thread overview]
Message-ID: <20191106140228.GA28081@renesas.com> (raw)
In-Reply-To: <20191106115308.112645-1-weiyongjun1@huawei.com>

On Wed, Nov 06, 2019 at 06:53:08AM EST, Wei Yongjun wrote:
>Add the missing unlock before return from function idtcm_probe()
>in the error handling case.
>
>Fixes: 3a6ba7dc7799 ("ptp: Add a ptp clock driver for IDT ClockMatrix.")
>Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>---
> drivers/ptp/ptp_clockmatrix.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c
>index cf5889b7d825..a5110b7b4ece 100644
>--- a/drivers/ptp/ptp_clockmatrix.c
>+++ b/drivers/ptp/ptp_clockmatrix.c
>@@ -1294,8 +1294,10 @@ static int idtcm_probe(struct i2c_client *client,
> 
> 	err = set_tod_write_overhead(idtcm);
> 
>-	if (err)
>+	if (err) {
>+		mutex_unlock(&idtcm->reg_lock);
> 		return err;
>+	}
> 
> 	err = idtcm_load_firmware(idtcm, &client->dev);
>

Yes, good catch.  Thank-you for the fix.

Reviewed-by: Vincent Cheng  <vincent.cheng.xh@renesas.com>

  reply	other threads:[~2019-11-06 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 11:53 [PATCH -next] ptp: Fix missing unlock on error in idtcm_probe() Wei Yongjun
2019-11-06 14:02 ` Vincent Cheng [this message]
2019-11-06 14:25   ` Dan Carpenter
2019-11-06 14:33 ` [PATCH v2 -next] ptp: ptp_clockmatrix: " Wei Yongjun
2019-11-07  5:20   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191106140228.GA28081@renesas.com \
    --to=vincent.cheng.xh@renesas.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).