aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZizhuang Deng <[email protected]>2022-03-10 20:54:50 +0800
committerJonathan Cameron <[email protected]>2022-04-04 09:19:01 +0100
commitb55b38f7cc12da3b9ef36e7a3b7f8f96737df4d5 (patch)
tree240ba14452ce0f48633ad4bbcbe0bb039169aa8a
parenta2a43fd9d84aec15f8c3dc434d50cd59d8a116b2 (diff)
iio: dac: ad5592r: Fix the missing return value.
The third call to `fwnode_property_read_u32` did not record the return value, resulting in `channel_offstate` possibly being assigned the wrong value. Fixes: 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Signed-off-by: Zizhuang Deng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
-rw-r--r--drivers/iio/dac/ad5592r-base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
index a424b7220b61..4434c1b2a322 100644
--- a/drivers/iio/dac/ad5592r-base.c
+++ b/drivers/iio/dac/ad5592r-base.c
@@ -522,7 +522,7 @@ static int ad5592r_alloc_channels(struct iio_dev *iio_dev)
if (!ret)
st->channel_modes[reg] = tmp;
- fwnode_property_read_u32(child, "adi,off-state", &tmp);
+ ret = fwnode_property_read_u32(child, "adi,off-state", &tmp);
if (!ret)
st->channel_offstate[reg] = tmp;
}