iio: imu: st_lsm6dsx: check return value from st_lsm6dsx_sensor_set_enable
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 2 Jan 2020 08:36:29 +0000 (09:36 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 13 Jan 2020 21:41:43 +0000 (21:41 +0000)
commita2dd9bd9334efb8dc0bdc0109abff3a7b57effb1
treee44346a2c5fb62fc7159172f83ac760beca89dfe
parent4766897a9d3bd6af171cdc5ff140e8d132d62d40
iio: imu: st_lsm6dsx: check return value from st_lsm6dsx_sensor_set_enable

Add missing return value check in st_lsm6dsx_read_oneshot disabling the
sensor. The issue is reported by coverity with the following error:

Unchecked return value:
If the function returns an error value, the error value may be mistaken
for a normal value.

Addresses-Coverity-ID: 1446733 ("Unchecked return value")
Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events")
Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c