From: Jonathan Cameron <jic23@kernel.org>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Jonathan Cameron <jic23@cam.ac.uk>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio:adc:at91: Relase mutex on error path in at91_adc_read_raw
Date: Mon, 25 Jun 2012 21:08:19 +0100 [thread overview]
Message-ID: <4FE8C533.2000107@kernel.org> (raw)
In-Reply-To: <4FE87D04.4080008@free-electrons.com>
On 06/25/2012 04:00 PM, Maxime Ripard wrote:
> Hi Lars,
>=20
> You can add my
> Acked-By: Maxime Ripard <maxime.ripard@free-electrons.com>
>=20
> Thanks,
> Maxime
>=20
> Le 25/06/2012 15:43, Lars-Peter Clausen a =E9crit :
>> This issue was reported by the mini_lock.cocci coccinelle semantic pat=
ch.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
>> ---
>> drivers/iio/adc/at91_adc.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
>> index 6a08469..f61780a 100644
>> --- a/drivers/iio/adc/at91_adc.c
>> +++ b/drivers/iio/adc/at91_adc.c
>> @@ -349,9 +349,11 @@ static int at91_adc_read_raw(struct iio_dev *idev=
,
>> st->done,
>> msecs_to_jiffies(1000));
>> if (ret =3D=3D 0)
>> - return -ETIMEDOUT;
>> - else if (ret < 0)
>> + ret =3D -ETIMEDOUT;
>> + if (ret < 0) {
>> + mutex_unlock(&st->lock);
>> return ret;
>> + }
>> =20
>> *val =3D st->last_value;
>> =20
>=20
>=20
next prev parent reply other threads:[~2012-06-25 20:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 13:43 [PATCH] iio:adc:at91: Relase mutex on error path in at91_adc_read_raw Lars-Peter Clausen
2012-06-25 15:00 ` Maxime Ripard
2012-06-25 20:08 ` Jonathan Cameron [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-26 8:43 Lars-Peter Clausen
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=4FE8C533.2000107@kernel.org \
--to=jic23@kernel.org \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=maxime.ripard@free-electrons.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).