Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@linaro.org>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Dan Carpenter and committed by
Jonathan Cameron
c6763b15 3ddda1db

+2 -1
+2 -1
drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
··· 57 57 } 58 58 59 59 if (chip == nb_chip) 60 - dev_err_probe(&i3cdev->dev, -ENODEV, "Failed to match part id %d\n", whoami); 60 + return dev_err_probe(&i3cdev->dev, -ENODEV, 61 + "Failed to match part id %d\n", whoami); 61 62 62 63 return inv_icm45600_core_probe(regmap, i3c_chip_info[chip], false, NULL); 63 64 }