summaryrefslogtreecommitdiff
path: root/include/linux/node.h
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2026-01-29 18:01:45 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2026-01-29 20:07:07 +0300
commitb79b24f578cdb2d657db23e5fafe82c7e6a36b72 (patch)
tree055aab6dd4225d9bae980ba038c922350ec5a891 /include/linux/node.h
parent53f0a73f9ec7575d4e59dc8dc70e891979ee2014 (diff)
downloadlinux-b79b24f578cdb2d657db23e5fafe82c7e6a36b72.tar.xz
iio: gyro: itg3200: Fix unchecked return value in read_raw
The return value from itg3200_read_reg_s16() is stored in ret but never checked. The function unconditionally returns IIO_VAL_INT, ignoring potential I2C read failures. This causes garbage data to be returned to userspace when the read fails, with no error reported. Add proper error checking to propagate the failure to callers. Fixes: 9dbf091da080 ("iio: gyro: Add itg3200") Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/node.h')
0 files changed, 0 insertions, 0 deletions