]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: ad4851: Fix signedness bug in ad4851_calibrate()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 28 Feb 2025 09:36:42 +0000 (12:36 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Mar 2025 13:17:51 +0000 (13:17 +0000)
commiteb2f9ab1f5133e5a16e3f6303464f5c60012aa05
tree69aa2c3b63513b26de042263562c875472a5b873
parent62c6b4f1c70e0a3a31df36dd055524cfe6acfa5e
iio: adc: ad4851: Fix signedness bug in ad4851_calibrate()

The "c" variable is used to store error codes from ad4851_find_opt()
so it has to be signed for the error handling to work.  Change it
to type int.

Fixes: 6250803fe2ec ("iio: adc: ad4851: add ad485x driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/f5e260e9-d7a8-4dae-b7ea-f1bbb1760e60@stanley.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad4851.c