Hi Lars, You can add my Acked-By: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx> Thanks, Maxime Le 25/06/2012 15:43, Lars-Peter Clausen a écrit : > This issue was reported by the mini_lock.cocci coccinelle semantic patch. > > Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> > --- > 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 == 0) > - return -ETIMEDOUT; > - else if (ret < 0) > + ret = -ETIMEDOUT; > + if (ret < 0) { > + mutex_unlock(&st->lock); > return ret; > + } > > *val = st->last_value; > -- Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html