Commit ee760ab2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 15fbc198
...@@ -332,8 +332,8 @@ static int ad7150_write_event_value(struct iio_dev *indio_dev, ...@@ -332,8 +332,8 @@ static int ad7150_write_event_value(struct iio_dev *indio_dev,
/* write back if active */ /* write back if active */
ret = ad7150_write_event_params(indio_dev, event_code); ret = ad7150_write_event_params(indio_dev, event_code);
mutex_unlock(&chip->state_lock);
error_ret: error_ret:
mutex_unlock(&chip->state_lock);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment