Skip to content

Commit f9381ec

Browse files
qianfengrongjic23
authored andcommitted
iio: dac: ad5360: use int type to store negative error codes
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: a3e2940 ("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>
1 parent 1d8fdab commit f9381ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/dac/ad5360.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int ad5360_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
262262
unsigned int clr)
263263
{
264264
struct ad5360_state *st = iio_priv(indio_dev);
265-
unsigned int ret;
265+
int ret;
266266

267267
mutex_lock(&st->lock);
268268

0 commit comments

Comments
 (0)