From: Jonathan Cameron <jic23@kernel.org>
To: Roberta Dobrescu <roberta.dobrescu@gmail.com>, linux-iio@vger.kernel.org
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
daniel.baluta@intel.com, dan.carpenter@oracle.com, kbuild@01.org
Subject: Re: [PATCH] staging: iio: light: isl29018: Add missing mutex_unlock on error path
Date: Thu, 30 Apr 2015 21:56:14 +0100 [thread overview]
Message-ID: <554296EE.5030705@kernel.org> (raw)
In-Reply-To: <1430240967-2459-1-git-send-email-roberta.dobrescu@gmail.com>
On 28/04/15 18:09, Roberta Dobrescu wrote:
> This patch fixes the following warning:
>
> drivers/staging/iio/light/isl29018.c:386 isl29018_write_raw() warn:
> inconsistent returns 'mutex:&chip->lock'.
> Locked on: line 374
> Unlocked on: line 386
>
> Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
I applied this as a fixup rather than a separate patch.
Anyhow, new testing and togreg branches should have this fixed.
> ---
> drivers/staging/iio/light/isl29018.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
> index 435d417..08ca9a4 100644
> --- a/drivers/staging/iio/light/isl29018.c
> +++ b/drivers/staging/iio/light/isl29018.c
> @@ -370,8 +370,10 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
> break;
> case IIO_CHAN_INFO_INT_TIME:
> if (chan->type == IIO_LIGHT)
> - if (val != 0)
> + if (val != 0) {
> + mutex_unlock(&chip->lock);
> return -EINVAL;
> + }
> ret = isl29018_set_integration_time(chip, val2);
> break;
> case IIO_CHAN_INFO_SCALE:
>
prev parent reply other threads:[~2015-04-30 20:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 17:09 [PATCH] staging: iio: light: isl29018: Add missing mutex_unlock on error path Roberta Dobrescu
2015-04-30 20:56 ` Jonathan Cameron [this message]
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=554296EE.5030705@kernel.org \
--to=jic23@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=daniel.baluta@intel.com \
--cc=kbuild@01.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=roberta.dobrescu@gmail.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