iio: imu: st_lsm6dsx: unlock on error in st_lsm6dsx_shub_write_raw()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 22 Apr 2020 09:38:11 +0000 (12:38 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 25 Apr 2020 17:33:54 +0000 (18:33 +0100)
commit115c215a7e5753ddf982c8760ce7904dd3fbb8ae
treea27e1dbea3d428225881f87222ff767101ccdd1e
parent98bcead07951ed76e1e85226c3a54d117e9f8b59
iio: imu: st_lsm6dsx: unlock on error in st_lsm6dsx_shub_write_raw()

We need to release a lock if st_lsm6dsx_check_odr() fails, we can't
return directly.

Fixes: 76551a3c3df1 ("iio: imu: st_lsm6dsx: specify slave odr in slv_odr")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c