diff options
author | Marek Vasut <marex@denx.de> | 2023-05-11 02:43:30 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-05-13 20:46:59 +0200 |
commit | 09d3bec7009186bdba77039df01e5834788b3f95 (patch) | |
tree | 99082de129ff10f0f3a9e3e0962d24ae867ee5ed /mm/Kconfig.debug | |
parent | iio: accel: kx022a fix irq getting (diff) | |
download | linux-09d3bec7009186bdba77039df01e5834788b3f95.tar.xz linux-09d3bec7009186bdba77039df01e5834788b3f95.zip |
iio: dac: mcp4725: Fix i2c_master_send() return value handling
The i2c_master_send() returns number of sent bytes on success,
or negative on error. The suspend/resume callbacks expect zero
on success and non-zero on error. Adapt the return value of the
i2c_master_send() to the expectation of the suspend and resume
callbacks, including proper validation of the return value.
Fixes: cf35ad61aca2 ("iio: add mcp4725 I2C DAC driver")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230511004330.206942-1-marex@denx.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'mm/Kconfig.debug')
0 files changed, 0 insertions, 0 deletions