Skip to content

Commit 3379c90

Browse files
qianfengrongjic23
authored andcommitted
iio: dac: ad5421: use int type to store negative error codes
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: 5691b23 ("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>
1 parent f9381ec commit 3379c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/dac/ad5421.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static int ad5421_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
186186
unsigned int clr)
187187
{
188188
struct ad5421_state *st = iio_priv(indio_dev);
189-
unsigned int ret;
189+
int ret;
190190

191191
mutex_lock(&st->lock);
192192

0 commit comments

Comments
 (0)