VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Dinghao Liu <dinghao.liu@zju.edu.cn> 2021-03-01 16:04:21 +0800 committer: Jonathan Cameron <Jonathan.Cameron@huawei.com> 2021-03-06 17:15:13 +0000 commit: 6dbbbe4cfd398704b72b21c1d4a5d3807e909d60 parent: 141e7633aa4d2838d1f6ad5c74cccc53547c16ac
Commit Summary:
iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c
index dfa31a23500f..ac90be03332a 100644
--- a/drivers/iio/gyro/mpu3050-core.c
+++ b/drivers/iio/gyro/mpu3050-core.c
@@ -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",