Staging: iio/adc/ad7150: release lock on error
Subsystems (5)
PATCH 1/1 Staging: iio/adc/ad7150: release lock on error
The error_ret label should have been before the mutex_unlock(). It's a typo.
Signed-off-by Dan Carpenter <[email protected]>
drivers/staging/iio/adc/ad7150.c +1 -1
@@ -332,8 +332,8 @@ static int ad7150_write_event_value(struct iio_dev *indio_dev,/* write back if active */ ret =ad7150_write_event_params (indio_dev, event_code); -mutex_unlock (&chip->state_lock); error_ret: +mutex_unlock (&chip->state_lock);return ret; }
Quoted 2 lines · Dan Carpenter
The
error_retlabel should have been before themutex_unlock(). It's a typo.
Good catch thanks!
Quoted 2 lines
Signed-off-by Dan Carpenter <[email protected]>
Acked-by Jonathan Cameron <[email protected]>
Quoted 16 lines
drivers/staging/iio/adc/ad7150.c +1
-1@@ -332,8 +332,8 @@ static int ad7150_write_event_value(struct iio_dev *indio_dev,/* write back if active */ ret =ad7150_write_event_params (indio_dev, event_code); -mutex_unlock (&chip->state_lock); error_ret: +mutex_unlock (&chip->state_lock);return ret; }