]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ad7266: Fix variable checking bug
authorFernando Yang <hagisf@usp.br>
Mon, 3 Jun 2024 18:07:54 +0000 (15:07 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2024 07:33:57 +0000 (09:33 +0200)
commit1ce8be8442cdc09bfc29fb14c56b2052193f48d0
tree75e7279a22a07335fe15ec44928b627df202c6ea
parent8c65da9b153a870c03f98f0eee071734ba2b5267
iio: adc: ad7266: Fix variable checking bug

commit a2b86132955268b2a1703082fbc2d4832fc001b8 upstream.

The ret variable was not checked after iio_device_release_direct_mode(),
which could possibly cause errors

Fixes: c70df20e3159 ("iio: adc: ad7266: claim direct mode during sensor read")
Signed-off-by: Fernando Yang <hagisf@usp.br>
Link: https://lore.kernel.org/r/20240603180757.8560-1-hagisf@usp.br
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ad7266.c