]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adis16475: fix deadlock on frequency set
authorNuno Sá <nuno.sa@analog.com>
Mon, 20 Sep 2021 09:00:47 +0000 (11:00 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 25 Sep 2021 15:01:06 +0000 (16:01 +0100)
commit89b304a160bc5eb79b9a5a13727370a49b641674
tree460c9bf2cec6325e9682cbbcdf568e167fc62062
parentca005b972670a07525ecc8e2f5320e9f0e8d6cf1
iio: adis16475: fix deadlock on frequency set

With commit 8d26520823e3a
("iio: adis16475: improve sync scale mode handling"), two deadlocks were
introduced:
 1) The call to 'adis_write_reg_16()' was not changed to it's unlocked
    version.
 2) The lock was not being released on the success path of the function.

This change fixes both these issues.

Fixes: 8d26520823e3a ("iio: adis16475: improve sync scale mode handling")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20210920090047.74903-1-nuno.sa@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16475.c