]> Git Repo - J-linux.git/commitdiff
iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler
authorDinghao Liu <[email protected]>
Mon, 1 Mar 2021 08:04:21 +0000 (16:04 +0800)
committerJonathan Cameron <[email protected]>
Sat, 6 Mar 2021 17:15:13 +0000 (17:15 +0000)
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 <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
drivers/iio/gyro/mpu3050-core.c

index dfa31a23500f0d622f026a9991eec23e1054818a..ac90be03332af86ba35687a76938e6684e8e268e 100644 (file)
@@ -551,6 +551,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",
This page took 0.060696 seconds and 4 git commands to generate.