summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-09-01 21:57:25 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:23:13 +0200
commitb2cbd3b2ccd8c1f778fec4f944c51348e3ff6a19 (patch)
treeb31b93a5234433dda47b31d6fdcc9e7c5b702f79 /drivers
parent3fb19f01e527dfba7d7c5b675e4a53e4a7ed5dcc (diff)
downloadlinux-b2cbd3b2ccd8c1f778fec4f944c51348e3ff6a19.tar.gz
linux-b2cbd3b2ccd8c1f778fec4f944c51348e3ff6a19.tar.bz2
linux-b2cbd3b2ccd8c1f778fec4f944c51348e3ff6a19.zip
iio: dac: ad5360: use int type to store negative error codes
commit f9381ece76de999a2065d5b4fdd87fa17883978c upstream. Change the 'ret' variable in ad5360_update_ctrl() from unsigned int to int, as it needs to store either negative error codes or zero returned by ad5360_write_unlocked(). Fixes: a3e2940c24d3 ("staging:iio:dac: Add AD5360 driver") Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20250901135726.17601-2-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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/dac/ad5360.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5360.c b/drivers/iio/dac/ad5360.c
index e0b7f658d611..cf9cf90cd6e2 100644
--- a/drivers/iio/dac/ad5360.c
+++ b/drivers/iio/dac/ad5360.c
@@ -262,7 +262,7 @@ static int ad5360_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
unsigned int clr)
{
struct ad5360_state *st = iio_priv(indio_dev);
- unsigned int ret;
+ int ret;
mutex_lock(&st->lock);