iio: cros_ec_sensors_core: fix unsigned compared less than zero on status
status is a u8 hence the check if status is less than zero has no effect. Fix this by replacing status with int ret so the less than zero compare will correctly detect errors. Issue found with static analysis with CoverityScan, CID 1375919 Signed-off-by: NColin Ian King <colin.king@canonical.com> Fixes: 974e6f02 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub") Reviewed-by: NGuenter Roeck <groeck@chromium.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Showing
想要评论请 注册 或 登录