diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2021-03-01 16:04:21 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-24 11:05:03 +0100 |
commit | 7ffb3fa5b774a8931a86b7ee047387329eaf95d9 (patch) | |
tree | 006797ef57eba4685d726a992c697da4d26f9e7e | |
parent | 9a429caa80b044915df720b36ee92c4416911513 (diff) | |
download | linux-stable-7ffb3fa5b774a8931a86b7ee047387329eaf95d9.tar.gz linux-stable-7ffb3fa5b774a8931a86b7ee047387329eaf95d9.tar.bz2 linux-stable-7ffb3fa5b774a8931a86b7ee047387329eaf95d9.zip |
iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler
commit 6dbbbe4cfd398704b72b21c1d4a5d3807e909d60 upstream.
There is one regmap_bulk_read() call in mpu3050_trigger_handler
that we have caught its return value bug lack further handling.
Check and terminate the execution flow just like the other three
regmap_bulk_read() calls in this function.
Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210301080421.13436-1-dinghao.liu@zju.edu.cn
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/iio/gyro/mpu3050-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c index a7be4670bf8f..3db843206db3 100644 --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -549,6 +549,8 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p) MPU3050_FIFO_R, &fifo_values[offset], toread); + if (ret) + goto out_trigger_unlock; dev_dbg(mpu3050->dev, "%04x %04x %04x %04x %04x\n", |