Re: [PATCH] iio: imu: bmi270: fix dev_err_probe error msg
From: Jonathan Cameron
Date: Sun Oct 12 2025 - 15:05:20 EST
On Fri, 10 Oct 2025 16:06:46 -0300
Rodrigo Gobbi <rodrigo.gobbi.7@xxxxxxxxx> wrote:
> The bmi270 can be connected to I2C or a SPI interface. If it is a SPI,
> during probe, if devm_regmap_init() fails, it should print the "spi"
> term rather "i2c".
>
> Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@xxxxxxxxx>
> ---
> Just fixing this little "typo", definitely it was copied from the bmi270_i2c.c [1],
> which has the same dev_err_probe logic.
> Tks and regards.
>
> [1] https://github.com/torvalds/linux/blob/master/drivers/iio/imu/bmi270/bmi270_i2c.c#L30
Given the confusion this could cause I'm thinking this should go to stable.
It needs a fixes tag.
thanks,
Jonathan
> ---
> drivers/iio/imu/bmi270/bmi270_spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/bmi270/bmi270_spi.c b/drivers/iio/imu/bmi270/bmi270_spi.c
> index 19dd7734f9d0..5e625586681d 100644
> --- a/drivers/iio/imu/bmi270/bmi270_spi.c
> +++ b/drivers/iio/imu/bmi270/bmi270_spi.c
> @@ -60,7 +60,7 @@ static int bmi270_spi_probe(struct spi_device *spi)
> &bmi270_spi_regmap_config);
> if (IS_ERR(regmap))
> return dev_err_probe(dev, PTR_ERR(regmap),
> - "Failed to init i2c regmap");
> + "Failed to init spi regmap");
>
> return bmi270_core_probe(dev, regmap, chip_info);
> }