iio: adc: max1027: unlock on error path in max1027_read_single_value()
If max1027_wait_eoc() fails then call iio_device_release_direct_mode() before returning. Fixes: a0e83165 ("iio: adc: max1027: Introduce an end of conversion helper") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YsbztVuAXnau2cIZ@kiliSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
想要评论请 注册 或 登录