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 <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Dan Carpenter 2011-10-06 09:17:00 +03:00 committed by Greg Kroah-Hartman
parent 15fbc198e6
commit ee760ab2a9

View File

@ -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;
}