]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: max1027: unlock on error path in max1027_read_single_value()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Jul 2022 14:54:45 +0000 (17:54 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Jul 2022 08:30:05 +0000 (09:30 +0100)
commitd49d650ed2d9b710f468036d0d7f17ba6caeeebd
tree72a298f75f0ee18f12acb953c00b094824e8c388
parent7c344a07116c97822516451b1699020c10fe9858
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: bbdb86306b29 ("iio: adc: max1027: Introduce an end of conversion helper")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YsbztVuAXnau2cIZ@kili
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1027.c