mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
iio: dac: ad5592r: Fix the missing return value.
commitb55b38f7ccupstream. 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:56ca9db862("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Signed-off-by: Zizhuang Deng <sunsetdzz@gmail.com> Link: https://lore.kernel.org/r/20220310125450.4164164-1-sunsetdzz@gmail.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
06ada9487f
commit
6ff33c01be
@@ -523,7 +523,7 @@ static int ad5592r_alloc_channels(struct iio_dev *iio_dev)
|
|||||||
if (!ret)
|
if (!ret)
|
||||||
st->channel_modes[reg] = tmp;
|
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)
|
if (!ret)
|
||||||
st->channel_offstate[reg] = tmp;
|
st->channel_offstate[reg] = tmp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user