]> git.ipfire.org Git - thirdparty/linux.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)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 8 Jun 2024 17:26:57 +0000 (18:26 +0100)
commita2b86132955268b2a1703082fbc2d4832fc001b8
tree10336f02cd604a57a4499b3dc589385bdaae6608
parent89b898c627a49b978a4c323ea6856eacfc21f6ba
iio: adc: ad7266: Fix variable checking bug

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>
drivers/iio/adc/ad7266.c