]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: dac: ad5421: use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Mon, 1 Sep 2025 13:57:26 +0000 (21:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:13 +0000 (16:23 +0200)
commit906bb4f98d3a70c8e409aca81cdde82ac6709511
treee50dcb4d3759dabdb90cb81a24c1fed0cbb06312
parentb2cbd3b2ccd8c1f778fec4f944c51348e3ff6a19
iio: dac: ad5421: use int type to store negative error codes

commit 3379c900320954d768ed9903691fb2520926bbe3 upstream.

Change the 'ret' variable in ad5421_update_ctrl() from unsigned int to
int, as it needs to store either negative error codes or zero returned
by ad5421_write_unlocked().

Fixes: 5691b23489db ("staging:iio:dac: Add AD5421 driver")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20250901135726.17601-3-rongqianfeng@vivo.com
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/dac/ad5421.c