[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPi5vEp75jH0imQc@stanley.mountain>
Date: Wed, 22 Oct 2025 14:02:20 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Remi Buisson <remi.buisson@....com>
Cc: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH next] iio: imu: inv_icm45600: Add a missing return statement
in probe()
The intention here was clearly to return -ENODEV but the return statement
was missing. It would result in an off by one read in i3c_chip_info[] on
the next line. Add the return statement.
Fixes: 1bef24e9007e ("iio: imu: inv_icm45600: add I3C driver for inv_icm45600 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
index b5df06b97d44..9247eae9b3e2 100644
--- a/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
+++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
@@ -57,7 +57,8 @@ static int inv_icm45600_i3c_probe(struct i3c_device *i3cdev)
}
if (chip == nb_chip)
- dev_err_probe(&i3cdev->dev, -ENODEV, "Failed to match part id %d\n", whoami);
+ return dev_err_probe(&i3cdev->dev, -ENODEV,
+ "Failed to match part id %d\n", whoami);
return inv_icm45600_core_probe(regmap, i3c_chip_info[chip], false, NULL);
}
--
2.51.0
Powered by blists - more mailing lists