Skip to content

Commit 6dbbbe4

Browse files
dinghaoliujic23
authored andcommitted
iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler
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: 3904b28 ("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]>
1 parent 141e763 commit 6dbbbe4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iio/gyro/mpu3050-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p)
551551
MPU3050_FIFO_R,
552552
&fifo_values[offset],
553553
toread);
554+
if (ret)
555+
goto out_trigger_unlock;
554556

555557
dev_dbg(mpu3050->dev,
556558
"%04x %04x %04x %04x %04x\n",

0 commit comments

Comments
 (0)