From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Jonathan Cameron <jic23@cam.ac.uk>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] iio:dac:ad5449: unlock on error path
Date: Fri, 02 Nov 2012 11:06:37 +0000 [thread overview]
Message-ID: <5093A93D.70302@kernel.org> (raw)
In-Reply-To: <5087A55C.6010202@metafoo.de>
On 10/24/2012 09:22 AM, Lars-Peter Clausen wrote:
> On 10/24/2012 09:13 AM, Dan Carpenter wrote:
>> There is an unlock missing on this error path.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Thanks,
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks applied to togreg branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
>
>> ---
>> Only needed in linux-next.
>>
>> diff --git a/drivers/iio/dac/ad5449.c b/drivers/iio/dac/ad5449.c
>> index 5b43030..0ee6f8e 100644
>> --- a/drivers/iio/dac/ad5449.c
>> +++ b/drivers/iio/dac/ad5449.c
>> @@ -124,12 +124,13 @@ static int ad5449_read(struct iio_dev *indio_dev, unsigned int addr,
>>
>> ret = spi_sync(st->spi, &msg);
>> if (ret < 0)
>> - return ret;
>> + goto out_unlock;
>>
>> *val = be16_to_cpu(st->data[1]);
>> - mutex_unlock(&indio_dev->mlock);
>>
>> - return 0;
>> +out_unlock:
>> + mutex_unlock(&indio_dev->mlock);
>> + return ret;
>> }
>>
>> static int ad5449_read_raw(struct iio_dev *indio_dev,
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-11-02 11:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 7:13 [patch] iio:dac:ad5449: unlock on error path Dan Carpenter
2012-10-24 8:22 ` Lars-Peter Clausen
2012-11-02 11:06 ` Jonathan Cameron [this message]
2012-11-02 16:52 ` walter harms
2012-11-05 6:38 ` Dan Carpenter
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=5093A93D.70302@kernel.org \
--to=jic23@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=jic23@cam.ac.uk \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/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).