diff options
author | Marek Vasut <[email protected]> | 2023-05-11 02:43:30 +0200 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2023-05-13 19:46:59 +0100 |
commit | 09d3bec7009186bdba77039df01e5834788b3f95 (patch) | |
tree | 99082de129ff10f0f3a9e3e0962d24ae867ee5ed /lib/mpi/mpi-sub-ui.c | |
parent | 56cd3d1c5c5b073a1a444eafdcf97d4d866d351a (diff) |
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 <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions