Skip to contentSkip to conversation

iio: Remove error prints for devm_add_action_or_reset()

PATCH Superseded Waqar Hameed 4 participants 4 messages Aug 5, 2025 – Aug 9, 2025

Subsystems (13)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iio: Remove error prints for devm_add_action_or_reset()

When devm_add_action_or_reset() fails, it is due to a failed memory allocation and will thus return -ENOMEM. dev_err_probe() doesn't do anything when error is -ENOMEM. Therefore, remove the useless call to dev_err_probe() when devm_add_action_or_reset() fails, and just return the value instead.

---
Changes in v2:

* Split the patch to one seperate patch for each sub-system.

Link to v1: https://lore.kernel.org/all/[email protected]/

 drivers/iio/accel/msa311.c          | 2 +-
 drivers/iio/adc/ad4130.c            | 3 +--
 drivers/iio/adc/ad7124.c            | 2 +-
 drivers/iio/adc/ad7173.c            | 3 +--
 drivers/iio/adc/mt6577_auxadc.c     | 3 +--
 drivers/iio/adc/pac1921.c           | 3 +--
 drivers/iio/adc/rockchip_saradc.c   | 3 +--
 drivers/iio/adc/ti-ads1119.c        | 3 +--
 drivers/iio/adc/ti-ads7924.c        | 6 ++----
 drivers/iio/frequency/adf4350.c     | 3 +--
 drivers/iio/light/al3000a.c         | 2 +-
 drivers/iio/light/apds9306.c        | 2 +-
 drivers/iio/light/bh1745.c          | 3 +--
 drivers/iio/light/opt4001.c         | 3 +--
 drivers/iio/light/opt4060.c         | 3 +--
 drivers/iio/magnetometer/als31300.c | 2 +-
 drivers/iio/magnetometer/tmag5273.c | 2 +-
 drivers/iio/proximity/vl53l0x-i2c.c | 3 +--
 drivers/iio/temperature/mlx90635.c  | 6 ++----
 19 files changed, 21 insertions(+), 36 deletions(-)
drivers/iio/accel/msa311.c +1 -1
index 3e10225410e8..2ccb22317bdc 100644
@@ -1195,7 +1195,7 @@ static int msa311_probe(struct i2c_client *i2c)
 	 */
 	err = devm_add_action_or_reset(dev, msa311_powerdown, msa311);
 	if (err)
-		return dev_err_probe(dev, err, "can't add powerdown action\n");
+		return err;
 
 	err = pm_runtime_set_active(dev);
 	if (err)
drivers/iio/adc/ad4130.c +1 -2
index 6cf790ff3eb5..ff778a44323f 100644
@@ -2035,8 +2035,7 @@ static int ad4130_probe(struct spi_device *spi)
 
 	ret = devm_add_action_or_reset(dev, ad4130_disable_regulators, st);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add regulators disable action\n");
+		return ret;
 
 	ret = ad4130_soft_reset(st);
 	if (ret)
drivers/iio/adc/ad7124.c +1 -1
index 9808df2e9242..4481a4ca7ac3 100644
@@ -1300,7 +1300,7 @@ static int ad7124_probe(struct spi_device *spi)
 		ret = devm_add_action_or_reset(&spi->dev, ad7124_reg_disable,
 					       st->vref[i]);
 		if (ret)
-			return dev_err_probe(dev, ret, "Failed to register disable handler for regulator #%d\n", i);
+			return ret;
 	}
 
 	st->mclk = devm_clk_get_enabled(&spi->dev, "mclk");
drivers/iio/adc/ad7173.c +1 -2
index 4413207be28f..d15e305d3380 100644
@@ -1717,8 +1717,7 @@ static int ad7173_fw_parse_device_config(struct iio_dev *indio_dev)
 
 	ret = devm_add_action_or_reset(dev, ad7173_disable_regulators, st);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add regulators disable action\n");
+		return ret;
 
 	ret = device_property_match_property_string(dev, "clock-names",
 						    ad7173_clk_sel,
drivers/iio/adc/mt6577_auxadc.c +1 -2
index 3343b54e8e44..fe9e3ece3fda 100644
@@ -297,8 +297,7 @@ static int mt6577_auxadc_probe(struct platform_device *pdev)
 
 	ret = devm_add_action_or_reset(&pdev->dev, mt6577_power_off, adc_dev);
 	if (ret)
-		return dev_err_probe(&pdev->dev, ret,
-				     "Failed to add action to managed power off\n");
+		return ret;
 
 	ret = devm_iio_device_register(&pdev->dev, indio_dev);
 	if (ret < 0)
drivers/iio/adc/pac1921.c +1 -2
index 72aa4ca2e5a4..35433250b008 100644
@@ -1279,8 +1279,7 @@ static int pac1921_probe(struct i2c_client *client)
 	ret = devm_add_action_or_reset(dev, pac1921_regulator_disable,
 				       priv->vdd);
 	if (ret)
-		return dev_err_probe(dev, ret,
-			"Cannot add action for vdd regulator disposal\n");
+		return ret;
 
 	msleep(PAC1921_POWERUP_TIME_MS);
 
drivers/iio/adc/rockchip_saradc.c +1 -2
index bd62daea0a3e..926971cb50bf 100644
@@ -527,8 +527,7 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
 	ret = devm_add_action_or_reset(&pdev->dev,
 				       rockchip_saradc_regulator_disable, info);
 	if (ret)
-		return dev_err_probe(&pdev->dev, ret,
-				     "failed to register devm action\n");
+		return ret;
 
 	ret = regulator_get_voltage(info->vref);
 	if (ret < 0)
drivers/iio/adc/ti-ads1119.c +1 -2
index d2f86e1ec656..3e4f79dfb078 100644
@@ -778,8 +778,7 @@ static int ads1119_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, ads1119_powerdown, st);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add powerdown action\n");
+		return ret;
 
 	return devm_iio_device_register(dev, indio_dev);
 }
drivers/iio/adc/ti-ads7924.c +2 -4
index b1f745f75dbe..46255c530cb4 100644
@@ -399,8 +399,7 @@ static int ads7924_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, ads7924_reg_disable, data->vref_reg);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "failed to add regulator disable action\n");
+		return ret;
 
 	ret = ads7924_reset(indio_dev);
 	if (ret < 0)
@@ -414,8 +413,7 @@ static int ads7924_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, ads7924_set_idle_mode, data);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "failed to add idle mode action\n");
+		return ret;
 
 	/* Use minimum signal acquire time. */
 	ret = regmap_update_bits(data->regmap, ADS7924_ACQCONFIG_REG,
drivers/iio/frequency/adf4350.c +1 -2
index 47f1c7e9efa9..6665409a9a87 100644
@@ -673,8 +673,7 @@ static int adf4350_probe(struct spi_device *spi)
 
 	ret = devm_add_action_or_reset(&spi->dev, adf4350_power_down, indio_dev);
 	if (ret)
-		return dev_err_probe(&spi->dev, ret,
-				     "Failed to add action to managed power down\n");
+		return ret;
 
 	return devm_iio_device_register(&spi->dev, indio_dev);
 }
drivers/iio/light/al3000a.c +1 -1
index 6f301c067045..9871096cbab3 100644
@@ -94,7 +94,7 @@ static int al3000a_init(struct al3000a_data *data)
 
 	ret = devm_add_action_or_reset(dev, al3000a_set_pwr_off, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add action\n");
+		return ret;
 
 	ret = regmap_write(data->regmap, AL3000A_REG_SYSTEM, AL3000A_CONFIG_RESET);
 	if (ret)
drivers/iio/light/apds9306.c +1 -1
index f676da245aa7..5eb33e8e3ad9 100644
@@ -1309,7 +1309,7 @@ static int apds9306_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, apds9306_powerdown, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add action or reset\n");
+		return ret;
 
 	ret = devm_iio_device_register(dev, indio_dev);
 	if (ret)
drivers/iio/light/bh1745.c +1 -2
index 4e9bd8f831f7..c7c604c96f6e 100644
@@ -814,8 +814,7 @@ static int bh1745_init(struct bh1745_data *data)
 
 	ret = devm_add_action_or_reset(dev, bh1745_power_off, data);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add action or reset\n");
+		return ret;
 
 	return 0;
 }
drivers/iio/light/opt4001.c +1 -2
index ba4eb82d9bc2..95167273bb90 100644
@@ -428,8 +428,7 @@ static int opt4001_probe(struct i2c_client *client)
 					opt4001_chip_off_action,
 					chip);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret,
-				     "Failed to setup power off action\n");
+		return ret;
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
drivers/iio/light/opt4060.c +1 -2
index 566f1bb8fe2a..7a1b6c703823 100644
@@ -1299,8 +1299,7 @@ static int opt4060_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, opt4060_chip_off_action, chip);
 	if (ret < 0)
-		return dev_err_probe(dev, ret,
-				     "Failed to setup power off action\n");
+		return ret;
 
 	ret = opt4060_setup_buffer(chip, indio_dev);
 	if (ret)
drivers/iio/magnetometer/als31300.c +1 -1
index f72af829715f..928e1378304c 100644
@@ -373,7 +373,7 @@ static int als31300_probe(struct i2c_client *i2c)
 
 	ret = devm_add_action_or_reset(dev, als31300_power_down, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add powerdown action\n");
+		return ret;
 
 	indio_dev->info = &als31300_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;
drivers/iio/magnetometer/tmag5273.c +1 -1
index 2ca5c26f0091..bdb656b031b1 100644
@@ -642,7 +642,7 @@ static int tmag5273_probe(struct i2c_client *i2c)
 	 */
 	ret = devm_add_action_or_reset(dev, tmag5273_power_down, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add powerdown action\n");
+		return ret;
 
 	ret = pm_runtime_set_active(dev);
 	if (ret < 0)
drivers/iio/proximity/vl53l0x-i2c.c +1 -2
index ef4aa7b2835e..b92fbd27755b 100644
@@ -352,8 +352,7 @@ static int vl53l0x_probe(struct i2c_client *client)
 
 	error = devm_add_action_or_reset(&client->dev, vl53l0x_power_off, data);
 	if (error)
-		return dev_err_probe(&client->dev, error,
-				     "Failed to install poweroff action\n");
+		return ret;
 
 	indio_dev->name = "vl53l0x";
 	indio_dev->info = &vl53l0x_info;
drivers/iio/temperature/mlx90635.c +2 -4
index f7f88498ba0e..1175c7887ae1 100644
@@ -977,8 +977,7 @@ static int mlx90635_probe(struct i2c_client *client)
 	ret = devm_add_action_or_reset(&client->dev, mlx90635_disable_regulator,
 				       mlx90635);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret,
-				     "failed to setup regulator cleanup action\n");
+		return ret;
 
 	ret = mlx90635_wakeup(mlx90635);
 	if (ret < 0)
@@ -986,8 +985,7 @@ static int mlx90635_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(&client->dev, mlx90635_sleep, mlx90635);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret,
-				     "failed to setup low power cleanup\n");
+		return ret;
 
 	ret = regmap_read(mlx90635->regmap_ee, MLX90635_EE_VERSION, &dsp_version);
 	if (ret < 0)

base-commit: 260f6f4fda93c8485c8037865c941b42b9cba5d2

Signature · 1 line
2.39.5
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Waqar Hameed

When devm_add_action_or_reset() fails, it is due to a failed memory allocation and will thus return -ENOMEM. dev_err_probe() doesn't do anything when error is -ENOMEM. Therefore, remove the useless call to dev_err_probe() when devm_add_action_or_reset() fails, and just return the value instead.

Even more, the devm has tracepoints in case somebody really wants to investigate failures.

Fully in support of this change.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#2 lore raw
Quoted 8 lines · On Tue, 5 Aug 2025 15:06:02 +0200 Andy Shevchenko <[email protected]>…
Quoted 6 lines · Waqar Hameed

When devm_add_action_or_reset() fails, it is due to a failed memory allocation and will thus return -ENOMEM. dev_err_probe() doesn't do anything when error is -ENOMEM. Therefore, remove the useless call to dev_err_probe() when devm_add_action_or_reset() fails, and just return the value instead.

Quoted 6 lines

Even more, the devm has tracepoints in case somebody really wants to investigate failures.

Fully in support of this change.

Applied to the testing branch of iio.git. I'll rebase that on rc1 once available.

Jonathan

Reviewed-by on v2 1/1
#3 lore raw
In reply to Waqar Hameed
Quoted 26 lines · Waqar Hameed

When devm_add_action_or_reset() fails, it is due to a failed memory allocation and will thus return -ENOMEM. dev_err_probe() doesn't do anything when error is -ENOMEM. Therefore, remove the useless call to dev_err_probe() when devm_add_action_or_reset() fails, and just return the value instead.

---
Changes in v2:

* Split the patch to one seperate patch for each sub-system.

Link to v1: https://lore.kernel.org/all/[email protected]/

 drivers/iio/accel/msa311.c          | 2 +-
 drivers/iio/adc/ad4130.c            | 3 +--
 drivers/iio/adc/ad7124.c            | 2 +-
 drivers/iio/adc/ad7173.c            | 3 +--
 drivers/iio/adc/mt6577_auxadc.c     | 3 +--
 drivers/iio/adc/pac1921.c           | 3 +--
 drivers/iio/adc/rockchip_saradc.c   | 3 +--
 drivers/iio/adc/ti-ads1119.c        | 3 +--
 drivers/iio/adc/ti-ads7924.c        | 6 ++----
 drivers/iio/frequency/adf4350.c     | 3 +--
 drivers/iio/light/al3000a.c         | 2 +-
 drivers/iio/light/apds9306.c        | 2 +-
Quoted 8 lines
 drivers/iio/light/bh1745.c          | 3 +--
 drivers/iio/light/opt4001.c         | 3 +--
 drivers/iio/light/opt4060.c         | 3 +--
 drivers/iio/magnetometer/als31300.c | 2 +-
 drivers/iio/magnetometer/tmag5273.c | 2 +-
 drivers/iio/proximity/vl53l0x-i2c.c | 3 +--
 drivers/iio/temperature/mlx90635.c  | 6 ++----
 19 files changed, 21 insertions(+), 36 deletions(-)

+1

Quoted 286 lines
drivers/iio/accel/msa311.c +1 -1
index 3e10225410e8..2ccb22317bdc 100644
@@ -1195,7 +1195,7 @@ static int msa311_probe(struct i2c_client *i2c)
 	 */
 	err = devm_add_action_or_reset(dev, msa311_powerdown, msa311);
 	if (err)
-		return dev_err_probe(dev, err, "can't add powerdown action\n");
+		return err;
 
 	err = pm_runtime_set_active(dev);
 	if (err)
drivers/iio/adc/ad4130.c +1 -2
index 6cf790ff3eb5..ff778a44323f 100644
@@ -2035,8 +2035,7 @@ static int ad4130_probe(struct spi_device *spi)
 
 	ret = devm_add_action_or_reset(dev, ad4130_disable_regulators, st);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add regulators disable action\n");
+		return ret;
 
 	ret = ad4130_soft_reset(st);
 	if (ret)
drivers/iio/adc/ad7124.c +1 -1
index 9808df2e9242..4481a4ca7ac3 100644
@@ -1300,7 +1300,7 @@ static int ad7124_probe(struct spi_device *spi)
 		ret = devm_add_action_or_reset(&spi->dev, ad7124_reg_disable,
 					       st->vref[i]);
 		if (ret)
-			return dev_err_probe(dev, ret, "Failed to register disable handler for regulator #%d\n", i);
+			return ret;
 	}
 
 	st->mclk = devm_clk_get_enabled(&spi->dev, "mclk");
drivers/iio/adc/ad7173.c +1 -2
index 4413207be28f..d15e305d3380 100644
@@ -1717,8 +1717,7 @@ static int ad7173_fw_parse_device_config(struct iio_dev *indio_dev)
 
 	ret = devm_add_action_or_reset(dev, ad7173_disable_regulators, st);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add regulators disable action\n");
+		return ret;
 
 	ret = device_property_match_property_string(dev, "clock-names",
 						    ad7173_clk_sel,
drivers/iio/adc/mt6577_auxadc.c +1 -2
index 3343b54e8e44..fe9e3ece3fda 100644
@@ -297,8 +297,7 @@ static int mt6577_auxadc_probe(struct platform_device *pdev)
 
 	ret = devm_add_action_or_reset(&pdev->dev, mt6577_power_off, adc_dev);
 	if (ret)
-		return dev_err_probe(&pdev->dev, ret,
-				     "Failed to add action to managed power off\n");
+		return ret;
 
 	ret = devm_iio_device_register(&pdev->dev, indio_dev);
 	if (ret < 0)
drivers/iio/adc/pac1921.c +1 -2
index 72aa4ca2e5a4..35433250b008 100644
@@ -1279,8 +1279,7 @@ static int pac1921_probe(struct i2c_client *client)
 	ret = devm_add_action_or_reset(dev, pac1921_regulator_disable,
 				       priv->vdd);
 	if (ret)
-		return dev_err_probe(dev, ret,
-			"Cannot add action for vdd regulator disposal\n");
+		return ret;
 
 	msleep(PAC1921_POWERUP_TIME_MS);
 
drivers/iio/adc/rockchip_saradc.c +1 -2
index bd62daea0a3e..926971cb50bf 100644
@@ -527,8 +527,7 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
 	ret = devm_add_action_or_reset(&pdev->dev,
 				       rockchip_saradc_regulator_disable, info);
 	if (ret)
-		return dev_err_probe(&pdev->dev, ret,
-				     "failed to register devm action\n");
+		return ret;
 
 	ret = regulator_get_voltage(info->vref);
 	if (ret < 0)
drivers/iio/adc/ti-ads1119.c +1 -2
index d2f86e1ec656..3e4f79dfb078 100644
@@ -778,8 +778,7 @@ static int ads1119_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, ads1119_powerdown, st);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add powerdown action\n");
+		return ret;
 
 	return devm_iio_device_register(dev, indio_dev);
 }
drivers/iio/adc/ti-ads7924.c +2 -4
index b1f745f75dbe..46255c530cb4 100644
@@ -399,8 +399,7 @@ static int ads7924_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, ads7924_reg_disable, data->vref_reg);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "failed to add regulator disable action\n");
+		return ret;
 
 	ret = ads7924_reset(indio_dev);
 	if (ret < 0)
@@ -414,8 +413,7 @@ static int ads7924_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, ads7924_set_idle_mode, data);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "failed to add idle mode action\n");
+		return ret;
 
 	/* Use minimum signal acquire time. */
 	ret = regmap_update_bits(data->regmap, ADS7924_ACQCONFIG_REG,
drivers/iio/frequency/adf4350.c +1 -2
index 47f1c7e9efa9..6665409a9a87 100644
@@ -673,8 +673,7 @@ static int adf4350_probe(struct spi_device *spi)
 
 	ret = devm_add_action_or_reset(&spi->dev, adf4350_power_down, indio_dev);
 	if (ret)
-		return dev_err_probe(&spi->dev, ret,
-				     "Failed to add action to managed power down\n");
+		return ret;
 
 	return devm_iio_device_register(&spi->dev, indio_dev);
 }
drivers/iio/light/al3000a.c +1 -1
index 6f301c067045..9871096cbab3 100644
@@ -94,7 +94,7 @@ static int al3000a_init(struct al3000a_data *data)
 
 	ret = devm_add_action_or_reset(dev, al3000a_set_pwr_off, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add action\n");
+		return ret;
 
 	ret = regmap_write(data->regmap, AL3000A_REG_SYSTEM, AL3000A_CONFIG_RESET);
 	if (ret)
drivers/iio/light/apds9306.c +1 -1
index f676da245aa7..5eb33e8e3ad9 100644
@@ -1309,7 +1309,7 @@ static int apds9306_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, apds9306_powerdown, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add action or reset\n");
+		return ret;
 
 	ret = devm_iio_device_register(dev, indio_dev);
 	if (ret)
drivers/iio/light/bh1745.c +1 -2
index 4e9bd8f831f7..c7c604c96f6e 100644
@@ -814,8 +814,7 @@ static int bh1745_init(struct bh1745_data *data)
 
 	ret = devm_add_action_or_reset(dev, bh1745_power_off, data);
 	if (ret)
-		return dev_err_probe(dev, ret,
-				     "Failed to add action or reset\n");
+		return ret;
 
 	return 0;
 }
drivers/iio/light/opt4001.c +1 -2
index ba4eb82d9bc2..95167273bb90 100644
@@ -428,8 +428,7 @@ static int opt4001_probe(struct i2c_client *client)
 					opt4001_chip_off_action,
 					chip);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret,
-				     "Failed to setup power off action\n");
+		return ret;
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
drivers/iio/light/opt4060.c +1 -2
index 566f1bb8fe2a..7a1b6c703823 100644
@@ -1299,8 +1299,7 @@ static int opt4060_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(dev, opt4060_chip_off_action, chip);
 	if (ret < 0)
-		return dev_err_probe(dev, ret,
-				     "Failed to setup power off action\n");
+		return ret;
 
 	ret = opt4060_setup_buffer(chip, indio_dev);
 	if (ret)
drivers/iio/magnetometer/als31300.c +1 -1
index f72af829715f..928e1378304c 100644
@@ -373,7 +373,7 @@ static int als31300_probe(struct i2c_client *i2c)
 
 	ret = devm_add_action_or_reset(dev, als31300_power_down, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add powerdown action\n");
+		return ret;
 
 	indio_dev->info = &als31300_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;
drivers/iio/magnetometer/tmag5273.c +1 -1
index 2ca5c26f0091..bdb656b031b1 100644
@@ -642,7 +642,7 @@ static int tmag5273_probe(struct i2c_client *i2c)
 	 */
 	ret = devm_add_action_or_reset(dev, tmag5273_power_down, data);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to add powerdown action\n");
+		return ret;
 
 	ret = pm_runtime_set_active(dev);
 	if (ret < 0)
drivers/iio/proximity/vl53l0x-i2c.c +1 -2
index ef4aa7b2835e..b92fbd27755b 100644
@@ -352,8 +352,7 @@ static int vl53l0x_probe(struct i2c_client *client)
 
 	error = devm_add_action_or_reset(&client->dev, vl53l0x_power_off, data);
 	if (error)
-		return dev_err_probe(&client->dev, error,
-				     "Failed to install poweroff action\n");
+		return ret;
 
 	indio_dev->name = "vl53l0x";
 	indio_dev->info = &vl53l0x_info;
drivers/iio/temperature/mlx90635.c +2 -4
index f7f88498ba0e..1175c7887ae1 100644
@@ -977,8 +977,7 @@ static int mlx90635_probe(struct i2c_client *client)
 	ret = devm_add_action_or_reset(&client->dev, mlx90635_disable_regulator,
 				       mlx90635);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret,
-				     "failed to setup regulator cleanup action\n");
+		return ret;
 
 	ret = mlx90635_wakeup(mlx90635);
 	if (ret < 0)
@@ -986,8 +985,7 @@ static int mlx90635_probe(struct i2c_client *client)
 
 	ret = devm_add_action_or_reset(&client->dev, mlx90635_sleep, mlx90635);
 	if (ret < 0)
-		return dev_err_probe(&client->dev, ret,
-				     "failed to setup low power cleanup\n");
+		return ret;
 
 	ret = regmap_read(mlx90635->regmap_ee, MLX90635_EE_VERSION, &dsp_version);
 	if (ret < 0)

base-commit: 260f6f4fda93c8485c8037865c941b42b9cba5d2

Signature · 1 line
2.39.5