diff options
| author | Antoniu Miclaus <antoniu.miclaus@analog.com> | 2026-01-29 21:14:52 +0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-03-04 00:20:00 +0300 |
| commit | f4e466aac34013904d81acfacf1f2453068578a2 (patch) | |
| tree | 1dfb516c57a9063b9f2ccb91c2ad2650a103582a /include/linux/stackprotector.h | |
| parent | f7c0ea2e782f5cf46f8c78859368106476e5f946 (diff) | |
| download | linux-f4e466aac34013904d81acfacf1f2453068578a2.tar.xz | |
iio: pressure: hsc030pa: Improve i2c_transfer return value handling
The i2c_transfer() function returns the number of messages
successfully transferred. The function sends 1 message but checks
for ret == 2, which can never be true.
In practice this has no impact since the caller checks ret < 0,
and the erroneous return value of 1 is not treated as an error.
Improve the return value handling to properly distinguish between
I2C errors and unexpected transfer counts.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Tested-by: Petre Rodan <petre.rodan@subdimension.ro>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
