On 07/11/2012 07:34 AM, Dan Carpenter wrote: > We should be holding the mutex when we goto error_free_chans. > > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> merged to fixes-togreg branch of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git and pull request sent. Thanks. > > diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c > index e2aded0..b5afc2f 100644 > --- a/drivers/iio/inkern.c > +++ b/drivers/iio/inkern.c > @@ -198,11 +198,12 @@ struct iio_channel *iio_channel_get_all(const char *name) > iio_device_get(chans[mapind].indio_dev); > mapind++; > } > - mutex_unlock(&iio_map_list_lock); > if (mapind == 0) { > ret = -ENODEV; > goto error_free_chans; > } > + mutex_unlock(&iio_map_list_lock); > + > return chans; > > error_free_chans: > -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html