linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
@ 2025-08-22  3:49 Dixit Parmar
  2025-08-22  3:49 ` [PATCH 01/10] iio: accel: " Dixit Parmar
                   ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().
With these patches, all the iio drivers now has uniform handling
of the -ENOMEM while device_allocation and trigger_allocation
calls.

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
Dixit Parmar (10):
      iio: accel: Drop unnecessary -ENOMEM messages
      iio: adc: Drop unnecessary -ENOMEM messages
      iio: dac: Drop unnecessary -ENOMEM messages
      iio: health: Drop unnecessary -ENOMEM messages
      iio: humidity: Drop unnecessary -ENOMEM messages
      iio: light: Drop unnecessary -ENOMEM messages
      iio: potentiostat: Drop unnecessary -ENOMEM messages
      iio: pressure: Drop unnecessary -ENOMEM messages
      iio: proximity: Drop unnecessary -ENOMEM messages
      iio: temperature: Drop unnecessary -ENOMEM messages

 drivers/iio/accel/bma220_spi.c      | 4 +---
 drivers/iio/accel/dmard06.c         | 4 +---
 drivers/iio/accel/dmard09.c         | 4 +---
 drivers/iio/accel/dmard10.c         | 4 +---
 drivers/iio/accel/mc3230.c          | 4 +---
 drivers/iio/accel/mma7660.c         | 4 +---
 drivers/iio/accel/stk8312.c         | 4 +---
 drivers/iio/accel/stk8ba50.c        | 4 +---
 drivers/iio/adc/ad7949.c            | 4 +---
 drivers/iio/adc/bcm_iproc_adc.c     | 4 +---
 drivers/iio/adc/cpcap-adc.c         | 6 ++----
 drivers/iio/adc/da9150-gpadc.c      | 5 ++---
 drivers/iio/adc/dln2-adc.c          | 9 +++------
 drivers/iio/adc/exynos_adc.c        | 4 +---
 drivers/iio/adc/imx7d_adc.c         | 4 +---
 drivers/iio/adc/imx8qxp-adc.c       | 4 +---
 drivers/iio/adc/mxs-lradc-adc.c     | 4 +---
 drivers/iio/adc/palmas_gpadc.c      | 4 +---
 drivers/iio/adc/rn5t618-adc.c       | 4 +---
 drivers/iio/adc/stm32-dfsdm-adc.c   | 4 +---
 drivers/iio/adc/stmpe-adc.c         | 4 +---
 drivers/iio/adc/ti-adc084s021.c     | 4 +---
 drivers/iio/adc/ti-ads131e08.c      | 8 ++------
 drivers/iio/adc/ti_am335x_adc.c     | 5 ++---
 drivers/iio/adc/twl4030-madc.c      | 4 +---
 drivers/iio/adc/viperboard_adc.c    | 4 +---
 drivers/iio/dac/ad5380.c            | 4 +---
 drivers/iio/dac/ad5764.c            | 4 +---
 drivers/iio/dac/ds4424.c            | 4 +---
 drivers/iio/dac/ti-dac7311.c        | 4 +---
 drivers/iio/dac/vf610_dac.c         | 4 +---
 drivers/iio/health/afe4403.c        | 4 +---
 drivers/iio/health/afe4404.c        | 4 +---
 drivers/iio/humidity/am2315.c       | 4 +---
 drivers/iio/humidity/dht11.c        | 4 +---
 drivers/iio/light/stk3310.c         | 4 +---
 drivers/iio/potentiostat/lmp91000.c | 4 +---
 drivers/iio/pressure/dlhl60d.c      | 4 +---
 drivers/iio/proximity/ping.c        | 4 +---
 drivers/iio/proximity/srf04.c       | 4 +---
 drivers/iio/temperature/mlx90632.c  | 4 +---
 41 files changed, 47 insertions(+), 130 deletions(-)
---
base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
change-id: 20250822-enomam_logs-f66642957fb3

Best regards,
-- 
Dixit Parmar <dixitparmar19@gmail.com>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 01/10] iio: accel: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  9:39   ` Andy Shevchenko
  2025-08-22  3:49 ` [PATCH 02/10] iio: adc: " Dixit Parmar
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/accel/bma220_spi.c | 4 +---
 drivers/iio/accel/dmard06.c    | 4 +---
 drivers/iio/accel/dmard09.c    | 4 +---
 drivers/iio/accel/dmard10.c    | 4 +---
 drivers/iio/accel/mc3230.c     | 4 +---
 drivers/iio/accel/mma7660.c    | 4 +---
 drivers/iio/accel/stk8312.c    | 4 +---
 drivers/iio/accel/stk8ba50.c   | 4 +---
 8 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index 38f7498431ee..01592eebf05b 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -255,10 +255,8 @@ static int bma220_probe(struct spi_device *spi)
 	struct bma220_data *data;
 
 	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&spi->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->spi_device = spi;
diff --git a/drivers/iio/accel/dmard06.c b/drivers/iio/accel/dmard06.c
index fb14894c66f9..33f225d73e7b 100644
--- a/drivers/iio/accel/dmard06.c
+++ b/drivers/iio/accel/dmard06.c
@@ -137,10 +137,8 @@ static int dmard06_probe(struct i2c_client *client)
 	}
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*dmard06));
-	if (!indio_dev) {
-		dev_err(&client->dev, "Failed to allocate iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	dmard06 = iio_priv(indio_dev);
 	dmard06->client = client;
diff --git a/drivers/iio/accel/dmard09.c b/drivers/iio/accel/dmard09.c
index 4ec70ca6910d..d9290e3b9c46 100644
--- a/drivers/iio/accel/dmard09.c
+++ b/drivers/iio/accel/dmard09.c
@@ -95,10 +95,8 @@ static int dmard09_probe(struct i2c_client *client)
 	struct dmard09_data *data;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;
diff --git a/drivers/iio/accel/dmard10.c b/drivers/iio/accel/dmard10.c
index 71cd1928baa6..575e8510e1bd 100644
--- a/drivers/iio/accel/dmard10.c
+++ b/drivers/iio/accel/dmard10.c
@@ -191,10 +191,8 @@ static int dmard10_probe(struct i2c_client *client)
 		return (ret < 0) ? ret : -ENODEV;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;
diff --git a/drivers/iio/accel/mc3230.c b/drivers/iio/accel/mc3230.c
index e2853090fa6e..3e494f9ddc56 100644
--- a/drivers/iio/accel/mc3230.c
+++ b/drivers/iio/accel/mc3230.c
@@ -169,10 +169,8 @@ static int mc3230_probe(struct i2c_client *client)
 	}
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->chip_info = chip_info;
diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c
index d0a16f227903..be3213600cf4 100644
--- a/drivers/iio/accel/mma7660.c
+++ b/drivers/iio/accel/mma7660.c
@@ -192,10 +192,8 @@ static int mma7660_probe(struct i2c_client *client)
 	struct mma7660_data *data;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;
diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c
index dfac2e44191f..305d88b1ae0b 100644
--- a/drivers/iio/accel/stk8312.c
+++ b/drivers/iio/accel/stk8312.c
@@ -505,10 +505,8 @@ static int stk8312_probe(struct i2c_client *client)
 	struct stk8312_data *data;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;
diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c
index 05d4fd540eb2..0f984b72a35b 100644
--- a/drivers/iio/accel/stk8ba50.c
+++ b/drivers/iio/accel/stk8ba50.c
@@ -386,10 +386,8 @@ static int stk8ba50_probe(struct i2c_client *client)
 	struct stk8ba50_data *data;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 02/10] iio: adc: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
  2025-08-22  3:49 ` [PATCH 01/10] iio: accel: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  9:41   ` Andy Shevchenko
  2025-08-22  3:49 ` [PATCH 03/10] iio: dac: " Dixit Parmar
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/adc/ad7949.c          | 4 +---
 drivers/iio/adc/bcm_iproc_adc.c   | 4 +---
 drivers/iio/adc/cpcap-adc.c       | 6 ++----
 drivers/iio/adc/da9150-gpadc.c    | 5 ++---
 drivers/iio/adc/dln2-adc.c        | 9 +++------
 drivers/iio/adc/exynos_adc.c      | 4 +---
 drivers/iio/adc/imx7d_adc.c       | 4 +---
 drivers/iio/adc/imx8qxp-adc.c     | 4 +---
 drivers/iio/adc/mxs-lradc-adc.c   | 4 +---
 drivers/iio/adc/palmas_gpadc.c    | 4 +---
 drivers/iio/adc/rn5t618-adc.c     | 4 +---
 drivers/iio/adc/stm32-dfsdm-adc.c | 4 +---
 drivers/iio/adc/stmpe-adc.c       | 4 +---
 drivers/iio/adc/ti-adc084s021.c   | 4 +---
 drivers/iio/adc/ti-ads131e08.c    | 8 ++------
 drivers/iio/adc/ti_am335x_adc.c   | 5 ++---
 drivers/iio/adc/twl4030-madc.c    | 4 +---
 drivers/iio/adc/viperboard_adc.c  | 4 +---
 18 files changed, 24 insertions(+), 61 deletions(-)

diff --git a/drivers/iio/adc/ad7949.c b/drivers/iio/adc/ad7949.c
index edd0c3a35ab7..4407828b4fc5 100644
--- a/drivers/iio/adc/ad7949.c
+++ b/drivers/iio/adc/ad7949.c
@@ -317,10 +317,8 @@ static int ad7949_spi_probe(struct spi_device *spi)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*ad7949_adc));
-	if (!indio_dev) {
-		dev_err(dev, "can not allocate iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	indio_dev->info = &ad7949_spi_info;
 	indio_dev->name = spi_get_device_id(spi)->name;
diff --git a/drivers/iio/adc/bcm_iproc_adc.c b/drivers/iio/adc/bcm_iproc_adc.c
index f258668b0dc7..6426c9e6ccc9 100644
--- a/drivers/iio/adc/bcm_iproc_adc.c
+++ b/drivers/iio/adc/bcm_iproc_adc.c
@@ -511,10 +511,8 @@ static int iproc_adc_probe(struct platform_device *pdev)
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev,
 					sizeof(*adc_priv));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "failed to allocate iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	adc_priv = iio_priv(indio_dev);
 	platform_set_drvdata(pdev, indio_dev);
diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c
index ba7cbd3b4822..d9ee2ea116a7 100644
--- a/drivers/iio/adc/cpcap-adc.c
+++ b/drivers/iio/adc/cpcap-adc.c
@@ -953,11 +953,9 @@ static int cpcap_adc_probe(struct platform_device *pdev)
 	int error;
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*ddata));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "failed to allocate iio device\n");
-
+	if (!indio_dev)
 		return -ENOMEM;
-	}
+
 	ddata = iio_priv(indio_dev);
 	ddata->ato = device_get_match_data(&pdev->dev);
 	if (!ddata->ato)
diff --git a/drivers/iio/adc/da9150-gpadc.c b/drivers/iio/adc/da9150-gpadc.c
index b99291ce2a45..625e3a8e4d03 100644
--- a/drivers/iio/adc/da9150-gpadc.c
+++ b/drivers/iio/adc/da9150-gpadc.c
@@ -308,10 +308,9 @@ static int da9150_gpadc_probe(struct platform_device *pdev)
 	int irq, ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*gpadc));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "Failed to allocate IIO device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
+
 	gpadc = iio_priv(indio_dev);
 
 	gpadc->da9150 = da9150;
diff --git a/drivers/iio/adc/dln2-adc.c b/drivers/iio/adc/dln2-adc.c
index 9dbd2c87938c..a6f3746b6f13 100644
--- a/drivers/iio/adc/dln2-adc.c
+++ b/drivers/iio/adc/dln2-adc.c
@@ -586,10 +586,8 @@ static int dln2_adc_probe(struct platform_device *pdev)
 	int i, ret, chans;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*dln2));
-	if (!indio_dev) {
-		dev_err(dev, "failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	dln2 = iio_priv(indio_dev);
 	dln2->pdev = pdev;
@@ -630,10 +628,9 @@ static int dln2_adc_probe(struct platform_device *pdev)
 	dln2->trig = devm_iio_trigger_alloc(dev, "%s-dev%d",
 					    indio_dev->name,
 					    iio_device_id(indio_dev));
-	if (!dln2->trig) {
-		dev_err(dev, "failed to allocate trigger\n");
+	if (!dln2->trig)
 		return -ENOMEM;
-	}
+
 	iio_trigger_set_drvdata(dln2->trig, dln2);
 	ret = devm_iio_trigger_register(dev, dln2->trig);
 	if (ret) {
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 4614cf848535..32cfc4002b1b 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -798,10 +798,8 @@ static int exynos_adc_probe(struct platform_device *pdev)
 	int irq;
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct exynos_adc));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	info = iio_priv(indio_dev);
 
diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c
index 09ce71f6e941..039c0387da23 100644
--- a/drivers/iio/adc/imx7d_adc.c
+++ b/drivers/iio/adc/imx7d_adc.c
@@ -482,10 +482,8 @@ static int imx7d_adc_probe(struct platform_device *pdev)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*info));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "Failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	info = iio_priv(indio_dev);
 	info->dev = dev;
diff --git a/drivers/iio/adc/imx8qxp-adc.c b/drivers/iio/adc/imx8qxp-adc.c
index be13a6ed7e00..427ee9f24408 100644
--- a/drivers/iio/adc/imx8qxp-adc.c
+++ b/drivers/iio/adc/imx8qxp-adc.c
@@ -315,10 +315,8 @@ static int imx8qxp_adc_probe(struct platform_device *pdev)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*adc));
-	if (!indio_dev) {
-		dev_err(dev, "Failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(indio_dev);
 	adc->dev = dev;
diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c
index 92baf3f5f560..dda5182a5076 100644
--- a/drivers/iio/adc/mxs-lradc-adc.c
+++ b/drivers/iio/adc/mxs-lradc-adc.c
@@ -697,10 +697,8 @@ static int mxs_lradc_adc_probe(struct platform_device *pdev)
 
 	/* Allocate the IIO device. */
 	iio = devm_iio_device_alloc(dev, sizeof(*adc));
-	if (!iio) {
-		dev_err(dev, "Failed to allocate IIO device\n");
+	if (!iio)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(iio);
 	adc->lradc = lradc;
diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c
index 7c01e33be04c..3f433064618e 100644
--- a/drivers/iio/adc/palmas_gpadc.c
+++ b/drivers/iio/adc/palmas_gpadc.c
@@ -885,10 +885,8 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*adc));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "iio_device_alloc failed\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(indio_dev);
 	adc->dev = &pdev->dev;
diff --git a/drivers/iio/adc/rn5t618-adc.c b/drivers/iio/adc/rn5t618-adc.c
index d6f6b351f2af..f78fc795b69a 100644
--- a/drivers/iio/adc/rn5t618-adc.c
+++ b/drivers/iio/adc/rn5t618-adc.c
@@ -199,10 +199,8 @@ static int rn5t618_adc_probe(struct platform_device *pdev)
 	struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent);
 
 	iio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*adc));
-	if (!iio_dev) {
-		dev_err(&pdev->dev, "failed allocating iio device\n");
+	if (!iio_dev)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(iio_dev);
 	adc->dev = &pdev->dev;
diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c
index f583924eb16b..92e5159793eb 100644
--- a/drivers/iio/adc/stm32-dfsdm-adc.c
+++ b/drivers/iio/adc/stm32-dfsdm-adc.c
@@ -1763,10 +1763,8 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev)
 
 	dev_data = of_device_get_match_data(dev);
 	iio = devm_iio_device_alloc(dev, sizeof(*adc));
-	if (!iio) {
-		dev_err(dev, "%s: Failed to allocate IIO\n", __func__);
+	if (!iio)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(iio);
 	adc->dfsdm = dev_get_drvdata(dev->parent);
diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c
index b0add5a2eab5..8e26c47edc08 100644
--- a/drivers/iio/adc/stmpe-adc.c
+++ b/drivers/iio/adc/stmpe-adc.c
@@ -267,10 +267,8 @@ static int stmpe_adc_probe(struct platform_device *pdev)
 		return irq_adc;
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct stmpe_adc));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	info = iio_priv(indio_dev);
 	mutex_init(&info->lock);
diff --git a/drivers/iio/adc/ti-adc084s021.c b/drivers/iio/adc/ti-adc084s021.c
index 50a474f4d9f5..a100f770fa1c 100644
--- a/drivers/iio/adc/ti-adc084s021.c
+++ b/drivers/iio/adc/ti-adc084s021.c
@@ -200,10 +200,8 @@ static int adc084s021_probe(struct spi_device *spi)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*adc));
-	if (!indio_dev) {
-		dev_err(&spi->dev, "Failed to allocate IIO device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(indio_dev);
 	adc->spi = spi;
diff --git a/drivers/iio/adc/ti-ads131e08.c b/drivers/iio/adc/ti-ads131e08.c
index 085f0d6fb39e..c3bf0ed46690 100644
--- a/drivers/iio/adc/ti-ads131e08.c
+++ b/drivers/iio/adc/ti-ads131e08.c
@@ -807,10 +807,8 @@ static int ads131e08_probe(struct spi_device *spi)
 	}
 
 	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
-	if (!indio_dev) {
-		dev_err(&spi->dev, "failed to allocate IIO device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	st = iio_priv(indio_dev);
 	st->info = info;
@@ -841,10 +839,8 @@ static int ads131e08_probe(struct spi_device *spi)
 
 	st->trig = devm_iio_trigger_alloc(&spi->dev, "%s-dev%d",
 		indio_dev->name, iio_device_id(indio_dev));
-	if (!st->trig) {
-		dev_err(&spi->dev, "failed to allocate IIO trigger\n");
+	if (!st->trig)
 		return -ENOMEM;
-	}
 
 	st->trig->ops = &ads131e08_trigger_ops;
 	st->trig->dev.parent = &spi->dev;
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index fe1509d3b1e7..99f274adc870 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -631,10 +631,9 @@ static int tiadc_probe(struct platform_device *pdev)
 	}
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*adc_dev));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "failed to allocate iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
+
 	adc_dev = iio_priv(indio_dev);
 
 	adc_dev->mfd_tscadc = ti_tscadc_dev_get(pdev);
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
index 0ea51ddeaa0a..fe3b31ec976e 100644
--- a/drivers/iio/adc/twl4030-madc.c
+++ b/drivers/iio/adc/twl4030-madc.c
@@ -758,10 +758,8 @@ static int twl4030_madc_probe(struct platform_device *pdev)
 	}
 
 	iio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*madc));
-	if (!iio_dev) {
-		dev_err(&pdev->dev, "failed allocating iio device\n");
+	if (!iio_dev)
 		return -ENOMEM;
-	}
 
 	madc = iio_priv(iio_dev);
 	madc->dev = &pdev->dev;
diff --git a/drivers/iio/adc/viperboard_adc.c b/drivers/iio/adc/viperboard_adc.c
index 1028b101cf56..9bb0b83c8f67 100644
--- a/drivers/iio/adc/viperboard_adc.c
+++ b/drivers/iio/adc/viperboard_adc.c
@@ -113,10 +113,8 @@ static int vprbrd_adc_probe(struct platform_device *pdev)
 
 	/* registering iio */
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*adc));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	adc = iio_priv(indio_dev);
 	adc->vb = vb;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 03/10] iio: dac: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
  2025-08-22  3:49 ` [PATCH 01/10] iio: accel: " Dixit Parmar
  2025-08-22  3:49 ` [PATCH 02/10] iio: adc: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-25 11:31   ` Jonathan Cameron
  2025-08-22  3:49 ` [PATCH 04/10] iio: health: " Dixit Parmar
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/dac/ad5380.c     | 4 +---
 drivers/iio/dac/ad5764.c     | 4 +---
 drivers/iio/dac/ds4424.c     | 4 +---
 drivers/iio/dac/ti-dac7311.c | 4 +---
 drivers/iio/dac/vf610_dac.c  | 4 +---
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
index f63af704b77e..ffb8c676c7a8 100644
--- a/drivers/iio/dac/ad5380.c
+++ b/drivers/iio/dac/ad5380.c
@@ -371,10 +371,8 @@ static int ad5380_probe(struct device *dev, struct regmap *regmap,
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
-	if (indio_dev == NULL) {
-		dev_err(dev, "Failed to allocate iio device\n");
+	if (indio_dev == NULL)
 		return -ENOMEM;
-	}
 
 	st = iio_priv(indio_dev);
 
diff --git a/drivers/iio/dac/ad5764.c b/drivers/iio/dac/ad5764.c
index 26c049d5b73a..fbbd7105a80c 100644
--- a/drivers/iio/dac/ad5764.c
+++ b/drivers/iio/dac/ad5764.c
@@ -278,10 +278,8 @@ static int ad5764_probe(struct spi_device *spi)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
-	if (indio_dev == NULL) {
-		dev_err(&spi->dev, "Failed to allocate iio device\n");
+	if (indio_dev == NULL)
 		return -ENOMEM;
-	}
 
 	st = iio_priv(indio_dev);
 	spi_set_drvdata(spi, indio_dev);
diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c
index a26a99753418..a8198ba4f98a 100644
--- a/drivers/iio/dac/ds4424.c
+++ b/drivers/iio/dac/ds4424.c
@@ -221,10 +221,8 @@ static int ds4424_probe(struct i2c_client *client)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio dev alloc failed.\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	i2c_set_clientdata(client, indio_dev);
diff --git a/drivers/iio/dac/ti-dac7311.c b/drivers/iio/dac/ti-dac7311.c
index 3d2ce61f0db6..5c1c5213962f 100644
--- a/drivers/iio/dac/ti-dac7311.c
+++ b/drivers/iio/dac/ti-dac7311.c
@@ -242,10 +242,8 @@ static int ti_dac_probe(struct spi_device *spi)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(*ti_dac));
-	if (!indio_dev) {
-		dev_err(dev, "can not allocate iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	spi->mode = SPI_MODE_1;
 	spi->bits_per_word = 16;
diff --git a/drivers/iio/dac/vf610_dac.c b/drivers/iio/dac/vf610_dac.c
index b30ff7bb4400..b7ee16ab4edd 100644
--- a/drivers/iio/dac/vf610_dac.c
+++ b/drivers/iio/dac/vf610_dac.c
@@ -178,10 +178,8 @@ static int vf610_dac_probe(struct platform_device *pdev)
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev,
 					sizeof(struct vf610_dac));
-	if (!indio_dev) {
-		dev_err(&pdev->dev, "Failed allocating iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	info = iio_priv(indio_dev);
 	info->dev = &pdev->dev;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 04/10] iio: health: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (2 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 03/10] iio: dac: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-25 11:35   ` Jonathan Cameron
  2025-08-22  3:49 ` [PATCH 05/10] iio: humidity: " Dixit Parmar
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/health/afe4403.c | 4 +---
 drivers/iio/health/afe4404.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
index 1582cfc03579..8e5db2235de0 100644
--- a/drivers/iio/health/afe4403.c
+++ b/drivers/iio/health/afe4403.c
@@ -531,10 +531,8 @@ static int afe4403_probe(struct spi_device *spi)
 						   "%s-dev%d",
 						   indio_dev->name,
 						   iio_device_id(indio_dev));
-		if (!afe->trig) {
-			dev_err(afe->dev, "Unable to allocate IIO trigger\n");
+		if (!afe->trig)
 			return -ENOMEM;
-		}
 
 		iio_trigger_set_drvdata(afe->trig, indio_dev);
 
diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
index 99ff68aed27c..11a0f465fd68 100644
--- a/drivers/iio/health/afe4404.c
+++ b/drivers/iio/health/afe4404.c
@@ -538,10 +538,8 @@ static int afe4404_probe(struct i2c_client *client)
 						   "%s-dev%d",
 						   indio_dev->name,
 						   iio_device_id(indio_dev));
-		if (!afe->trig) {
-			dev_err(afe->dev, "Unable to allocate IIO trigger\n");
+		if (!afe->trig)
 			return -ENOMEM;
-		}
 
 		iio_trigger_set_drvdata(afe->trig, indio_dev);
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 05/10] iio: humidity: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (3 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 04/10] iio: health: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  3:49 ` [PATCH 06/10] iio: light: " Dixit Parmar
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/humidity/am2315.c | 4 +---
 drivers/iio/humidity/dht11.c  | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
index f021c3e6d886..02ca23eb8991 100644
--- a/drivers/iio/humidity/am2315.c
+++ b/drivers/iio/humidity/am2315.c
@@ -224,10 +224,8 @@ static int am2315_probe(struct i2c_client *client)
 	struct am2315_data *data;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;
diff --git a/drivers/iio/humidity/dht11.c b/drivers/iio/humidity/dht11.c
index 48c59d09eea7..cc8f02f3b763 100644
--- a/drivers/iio/humidity/dht11.c
+++ b/drivers/iio/humidity/dht11.c
@@ -296,10 +296,8 @@ static int dht11_probe(struct platform_device *pdev)
 	struct iio_dev *iio;
 
 	iio = devm_iio_device_alloc(dev, sizeof(*dht11));
-	if (!iio) {
-		dev_err(dev, "Failed to allocate IIO device\n");
+	if (!iio)
 		return -ENOMEM;
-	}
 
 	dht11 = iio_priv(iio);
 	dht11->dev = dev;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 06/10] iio: light: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (4 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 05/10] iio: humidity: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  3:49 ` [PATCH 07/10] iio: potentiostat: " Dixit Parmar
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/light/stk3310.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index deada9ba4748..c7ccf58e52d7 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -609,10 +609,8 @@ static int stk3310_probe(struct i2c_client *client)
 	struct stk3310_data *data;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-	if (!indio_dev) {
-		dev_err(&client->dev, "iio allocation failed!\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->client = client;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 07/10] iio: potentiostat: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (5 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 06/10] iio: light: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  3:49 ` [PATCH 08/10] iio: pressure: " Dixit Parmar
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/potentiostat/lmp91000.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index 030498d0b763..eccc2a34358f 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -321,10 +321,8 @@ static int lmp91000_probe(struct i2c_client *client)
 	data->trig = devm_iio_trigger_alloc(dev, "%s-mux%d",
 					    indio_dev->name,
 					    iio_device_id(indio_dev));
-	if (!data->trig) {
-		dev_err(dev, "cannot allocate iio trigger.\n");
+	if (!data->trig)
 		return -ENOMEM;
-	}
 
 	init_completion(&data->completion);
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 08/10] iio: pressure: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (6 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 07/10] iio: potentiostat: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  3:49 ` [PATCH 09/10] iio: proximity: " Dixit Parmar
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/pressure/dlhl60d.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iio/pressure/dlhl60d.c b/drivers/iio/pressure/dlhl60d.c
index 48afe5c94000..c5f4f5efaef8 100644
--- a/drivers/iio/pressure/dlhl60d.c
+++ b/drivers/iio/pressure/dlhl60d.c
@@ -294,10 +294,8 @@ static int dlh_probe(struct i2c_client *client)
 	}
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st));
-	if (!indio_dev) {
-		dev_err(&client->dev, "failed to allocate iio device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	i2c_set_clientdata(client, indio_dev);
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 09/10] iio: proximity: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (7 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 08/10] iio: pressure: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  3:49 ` [PATCH 10/10] iio: temperature: " Dixit Parmar
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/proximity/ping.c  | 4 +---
 drivers/iio/proximity/srf04.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/proximity/ping.c b/drivers/iio/proximity/ping.c
index c5b4e1378b7d..e3487094d7be 100644
--- a/drivers/iio/proximity/ping.c
+++ b/drivers/iio/proximity/ping.c
@@ -280,10 +280,8 @@ static int ping_probe(struct platform_device *pdev)
 	struct iio_dev *indio_dev;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(struct ping_data));
-	if (!indio_dev) {
-		dev_err(dev, "failed to allocate IIO device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->dev = dev;
diff --git a/drivers/iio/proximity/srf04.c b/drivers/iio/proximity/srf04.c
index b059bac1078b..f9d32f9aba1f 100644
--- a/drivers/iio/proximity/srf04.c
+++ b/drivers/iio/proximity/srf04.c
@@ -253,10 +253,8 @@ static int srf04_probe(struct platform_device *pdev)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(dev, sizeof(struct srf04_data));
-	if (!indio_dev) {
-		dev_err(dev, "failed to allocate IIO device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	data = iio_priv(indio_dev);
 	data->dev = dev;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 10/10] iio: temperature: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (8 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 09/10] iio: proximity: " Dixit Parmar
@ 2025-08-22  3:49 ` Dixit Parmar
  2025-08-22  6:19 ` [PATCH 00/10] iio: " Andy Shevchenko
  2025-08-25  8:31 ` Jonathan Cameron
  11 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  3:49 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori
  Cc: linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32, Dixit Parmar

The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err
messages from the probe().

Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
 drivers/iio/temperature/mlx90632.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
index ae4ea587e7f9..c4bf5dc2f266 100644
--- a/drivers/iio/temperature/mlx90632.c
+++ b/drivers/iio/temperature/mlx90632.c
@@ -1178,10 +1178,8 @@ static int mlx90632_probe(struct i2c_client *client)
 	int ret;
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*mlx90632));
-	if (!indio_dev) {
-		dev_err(&client->dev, "Failed to allocate device\n");
+	if (!indio_dev)
 		return -ENOMEM;
-	}
 
 	regmap = devm_regmap_init_i2c(client, &mlx90632_regmap);
 	if (IS_ERR(regmap)) {

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (9 preceding siblings ...)
  2025-08-22  3:49 ` [PATCH 10/10] iio: temperature: " Dixit Parmar
@ 2025-08-22  6:19 ` Andy Shevchenko
  2025-08-22  9:28   ` Dixit Parmar
  2025-08-25  8:31 ` Jonathan Cameron
  11 siblings, 1 reply; 21+ messages in thread
From: Andy Shevchenko @ 2025-08-22  6:19 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, Aug 22, 2025 at 6:50 AM Dixit Parmar <dixitparmar19@gmail.com> wrote:
>
> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().
> With these patches, all the iio drivers now has uniform handling
> of the -ENOMEM while device_allocation and trigger_allocation
> calls.

I don't understand. Don't you have a subscription to linux-iio@ ML?
https://lore.kernel.org/linux-iio/CAHp75VdL9kV2fyi63zqPZnW4CaeYPmJ74tmGEgU=M7FSYBv0ww@mail.gmail.com/T/#t
If you found something new, please base it on that series as it was
already sent and reviewed.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
  2025-08-22  6:19 ` [PATCH 00/10] iio: " Andy Shevchenko
@ 2025-08-22  9:28   ` Dixit Parmar
  2025-08-22  9:37     ` Andy Shevchenko
  0 siblings, 1 reply; 21+ messages in thread
From: Dixit Parmar @ 2025-08-22  9:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, Aug 22, 2025 at 11:49 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> I don't understand. Don't you have a subscription to linux-iio@ ML?
> https://lore.kernel.org/linux-iio/CAHp75VdL9kV2fyi63zqPZnW4CaeYPmJ74tmGEgU=M7FSYBv0ww@mail.gmail.com/T/#t
> If you found something new, please base it on that series as it was
> already sent and reviewed.
Thanks. I do have subscription to linux-iio@ML and did check the patch
series you mentioned.
That patch series by Xichao Zhao removes dev_err_probe() for -ENOMEM
cases whereas
this series is targeting slightly different cleanup of removing the
plain dev_err() log messages
that are there for -ENOMEM.
As far as I can see, both the series are modifying completely
different driver files without overlapping changes.
Since the objectives are related but independent and addressing
different type of change, I thought to keep
these patches in different patch series and have clear differentiation.
Although to establish similarity it would have made more sense If I
would have added the link to that patch series here.
Thanks,
Dixit

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
  2025-08-22  9:28   ` Dixit Parmar
@ 2025-08-22  9:37     ` Andy Shevchenko
  0 siblings, 0 replies; 21+ messages in thread
From: Andy Shevchenko @ 2025-08-22  9:37 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: Andy Shevchenko, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Lars-Peter Clausen, Michael Hennerich, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Support Opensource, Krzysztof Kozlowski, Alim Akhtar, Haibo Chen,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Cai Huoqing, Maxime Coquelin, Alexandre Torgue, Andreas Klinger,
	Crt Mori, linux-iio, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, imx, linux-stm32

On Fri, Aug 22, 2025 at 02:58:34PM +0530, Dixit Parmar wrote:
> On Fri, Aug 22, 2025 at 11:49 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > I don't understand. Don't you have a subscription to linux-iio@ ML?
> > https://lore.kernel.org/linux-iio/CAHp75VdL9kV2fyi63zqPZnW4CaeYPmJ74tmGEgU=M7FSYBv0ww@mail.gmail.com/T/#t
> > If you found something new, please base it on that series as it was
> > already sent and reviewed.

> Thanks. I do have subscription to linux-iio@ML and did check the patch
> series you mentioned.
> That patch series by Xichao Zhao removes dev_err_probe() for -ENOMEM
> cases whereas
> this series is targeting slightly different cleanup of removing the
> plain dev_err() log messages
> that are there for -ENOMEM.

I see, makes sense.

> As far as I can see, both the series are modifying completely
> different driver files without overlapping changes.
> Since the objectives are related but independent and addressing
> different type of change, I thought to keep
> these patches in different patch series and have clear differentiation.
> Although to establish similarity it would have made more sense If I
> would have added the link to that patch series here.

With this clarification it indeed may be applied independently.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 01/10] iio: accel: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 ` [PATCH 01/10] iio: accel: " Dixit Parmar
@ 2025-08-22  9:39   ` Andy Shevchenko
  0 siblings, 0 replies; 21+ messages in thread
From: Andy Shevchenko @ 2025-08-22  9:39 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, Aug 22, 2025 at 09:19:49AM +0530, Dixit Parmar wrote:
> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().

Misplaced (), should be like
"...So remove the dev_err() messages from the probe."

Same applies to all of the affected commit messages in the series.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 02/10] iio: adc: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 ` [PATCH 02/10] iio: adc: " Dixit Parmar
@ 2025-08-22  9:41   ` Andy Shevchenko
  0 siblings, 0 replies; 21+ messages in thread
From: Andy Shevchenko @ 2025-08-22  9:41 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Lars-Peter Clausen, Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, Aug 22, 2025 at 09:19:50AM +0530, Dixit Parmar wrote:
> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().

...

>  	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*ddata));
> -	if (!indio_dev) {
> -		dev_err(&pdev->dev, "failed to allocate iio device\n");
> -
> +	if (!indio_dev)
>  		return -ENOMEM;
> -	}
> +
>  	ddata = iio_priv(indio_dev);
>  	ddata->ato = device_get_match_data(&pdev->dev);
>  	if (!ddata->ato)

Looking at this hunk I'm wondering if you are using --histogram diff algo when
preparing patches. If not, please do for the next version.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
                   ` (10 preceding siblings ...)
  2025-08-22  6:19 ` [PATCH 00/10] iio: " Andy Shevchenko
@ 2025-08-25  8:31 ` Jonathan Cameron
  2025-08-25 11:39   ` Jonathan Cameron
  11 siblings, 1 reply; 21+ messages in thread
From: Jonathan Cameron @ 2025-08-25  8:31 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen,
	Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, 22 Aug 2025 09:19:48 +0530
Dixit Parmar <dixitparmar19@gmail.com> wrote:

> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().
> With these patches, all the iio drivers now has uniform handling
> of the -ENOMEM while device_allocation and trigger_allocation
> calls.
> 
> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
Series looks fine to me, after the minor tweaks to commit messages
that Andy requested.  However as it touches a lot of drivers
I'd like to leave it on list a little longer.

Thanks,

Jonathan

> ---
> Dixit Parmar (10):
>       iio: accel: Drop unnecessary -ENOMEM messages
>       iio: adc: Drop unnecessary -ENOMEM messages
>       iio: dac: Drop unnecessary -ENOMEM messages
>       iio: health: Drop unnecessary -ENOMEM messages
>       iio: humidity: Drop unnecessary -ENOMEM messages
>       iio: light: Drop unnecessary -ENOMEM messages
>       iio: potentiostat: Drop unnecessary -ENOMEM messages
>       iio: pressure: Drop unnecessary -ENOMEM messages
>       iio: proximity: Drop unnecessary -ENOMEM messages
>       iio: temperature: Drop unnecessary -ENOMEM messages
> 
>  drivers/iio/accel/bma220_spi.c      | 4 +---
>  drivers/iio/accel/dmard06.c         | 4 +---
>  drivers/iio/accel/dmard09.c         | 4 +---
>  drivers/iio/accel/dmard10.c         | 4 +---
>  drivers/iio/accel/mc3230.c          | 4 +---
>  drivers/iio/accel/mma7660.c         | 4 +---
>  drivers/iio/accel/stk8312.c         | 4 +---
>  drivers/iio/accel/stk8ba50.c        | 4 +---
>  drivers/iio/adc/ad7949.c            | 4 +---
>  drivers/iio/adc/bcm_iproc_adc.c     | 4 +---
>  drivers/iio/adc/cpcap-adc.c         | 6 ++----
>  drivers/iio/adc/da9150-gpadc.c      | 5 ++---
>  drivers/iio/adc/dln2-adc.c          | 9 +++------
>  drivers/iio/adc/exynos_adc.c        | 4 +---
>  drivers/iio/adc/imx7d_adc.c         | 4 +---
>  drivers/iio/adc/imx8qxp-adc.c       | 4 +---
>  drivers/iio/adc/mxs-lradc-adc.c     | 4 +---
>  drivers/iio/adc/palmas_gpadc.c      | 4 +---
>  drivers/iio/adc/rn5t618-adc.c       | 4 +---
>  drivers/iio/adc/stm32-dfsdm-adc.c   | 4 +---
>  drivers/iio/adc/stmpe-adc.c         | 4 +---
>  drivers/iio/adc/ti-adc084s021.c     | 4 +---
>  drivers/iio/adc/ti-ads131e08.c      | 8 ++------
>  drivers/iio/adc/ti_am335x_adc.c     | 5 ++---
>  drivers/iio/adc/twl4030-madc.c      | 4 +---
>  drivers/iio/adc/viperboard_adc.c    | 4 +---
>  drivers/iio/dac/ad5380.c            | 4 +---
>  drivers/iio/dac/ad5764.c            | 4 +---
>  drivers/iio/dac/ds4424.c            | 4 +---
>  drivers/iio/dac/ti-dac7311.c        | 4 +---
>  drivers/iio/dac/vf610_dac.c         | 4 +---
>  drivers/iio/health/afe4403.c        | 4 +---
>  drivers/iio/health/afe4404.c        | 4 +---
>  drivers/iio/humidity/am2315.c       | 4 +---
>  drivers/iio/humidity/dht11.c        | 4 +---
>  drivers/iio/light/stk3310.c         | 4 +---
>  drivers/iio/potentiostat/lmp91000.c | 4 +---
>  drivers/iio/pressure/dlhl60d.c      | 4 +---
>  drivers/iio/proximity/ping.c        | 4 +---
>  drivers/iio/proximity/srf04.c       | 4 +---
>  drivers/iio/temperature/mlx90632.c  | 4 +---
>  41 files changed, 47 insertions(+), 130 deletions(-)
> ---
> base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
> change-id: 20250822-enomam_logs-f66642957fb3
> 
> Best regards,


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 03/10] iio: dac: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 ` [PATCH 03/10] iio: dac: " Dixit Parmar
@ 2025-08-25 11:31   ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2025-08-25 11:31 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen,
	Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, 22 Aug 2025 09:19:51 +0530
Dixit Parmar <dixitparmar19@gmail.com> wrote:

> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().
> 
> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
> ---
>  drivers/iio/dac/ad5380.c     | 4 +---
>  drivers/iio/dac/ad5764.c     | 4 +---
>  drivers/iio/dac/ds4424.c     | 4 +---
>  drivers/iio/dac/ti-dac7311.c | 4 +---
>  drivers/iio/dac/vf610_dac.c  | 4 +---
Raced with another series doing a dev_err_probe() conversion and the relevant
lines are gone.

I'll fix up.

Jonathan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 04/10] iio: health: Drop unnecessary -ENOMEM messages
  2025-08-22  3:49 ` [PATCH 04/10] iio: health: " Dixit Parmar
@ 2025-08-25 11:35   ` Jonathan Cameron
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Cameron @ 2025-08-25 11:35 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen,
	Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Fri, 22 Aug 2025 09:19:52 +0530
Dixit Parmar <dixitparmar19@gmail.com> wrote:

> The drivers do not require their own error messages for error
> -ENOMEM, memory allocation failures. So remove the dev_err
> messages from the probe().
> 
> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
Some code movement in here so I had applied the equivalent.

J
> ---
>  drivers/iio/health/afe4403.c | 4 +---
>  drivers/iio/health/afe4404.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
> index 1582cfc03579..8e5db2235de0 100644
> --- a/drivers/iio/health/afe4403.c
> +++ b/drivers/iio/health/afe4403.c
> @@ -531,10 +531,8 @@ static int afe4403_probe(struct spi_device *spi)
>  						   "%s-dev%d",
>  						   indio_dev->name,
>  						   iio_device_id(indio_dev));
> -		if (!afe->trig) {
> -			dev_err(afe->dev, "Unable to allocate IIO trigger\n");
> +		if (!afe->trig)
>  			return -ENOMEM;
> -		}
>  
>  		iio_trigger_set_drvdata(afe->trig, indio_dev);
>  
> diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
> index 99ff68aed27c..11a0f465fd68 100644
> --- a/drivers/iio/health/afe4404.c
> +++ b/drivers/iio/health/afe4404.c
> @@ -538,10 +538,8 @@ static int afe4404_probe(struct i2c_client *client)
>  						   "%s-dev%d",
>  						   indio_dev->name,
>  						   iio_device_id(indio_dev));
> -		if (!afe->trig) {
> -			dev_err(afe->dev, "Unable to allocate IIO trigger\n");
> +		if (!afe->trig)
>  			return -ENOMEM;
> -		}
>  
>  		iio_trigger_set_drvdata(afe->trig, indio_dev);
>  
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
  2025-08-25  8:31 ` Jonathan Cameron
@ 2025-08-25 11:39   ` Jonathan Cameron
  2025-08-26  2:42     ` Dixit Parmar
  0 siblings, 1 reply; 21+ messages in thread
From: Jonathan Cameron @ 2025-08-25 11:39 UTC (permalink / raw)
  To: Dixit Parmar
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen,
	Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Mon, 25 Aug 2025 09:31:50 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Fri, 22 Aug 2025 09:19:48 +0530
> Dixit Parmar <dixitparmar19@gmail.com> wrote:
> 
> > The drivers do not require their own error messages for error
> > -ENOMEM, memory allocation failures. So remove the dev_err
> > messages from the probe().
> > With these patches, all the iio drivers now has uniform handling
> > of the -ENOMEM while device_allocation and trigger_allocation
> > calls.
> > 
> > Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>  
> Series looks fine to me, after the minor tweaks to commit messages
> that Andy requested.  However as it touches a lot of drivers
> I'd like to leave it on list a little longer.

I changed my mind after taking the dev_err_probe() series earlier.
I'm rather too busy at the moment, so clearing this out now will reduce
what I need to keep track of.

Fixed up the () that Andy asked for in commit messages and applied
to the togreg branch of iio.git, pushed out initially as testing.

There is still the rest of the week (probably) in which I can add
tags etc if anyone wants to give them before I push that out as
a non rebasing tree.

Thanks,

Jonathan

> 
> Thanks,
> 
> Jonathan
> 
> > ---
> > Dixit Parmar (10):
> >       iio: accel: Drop unnecessary -ENOMEM messages
> >       iio: adc: Drop unnecessary -ENOMEM messages
> >       iio: dac: Drop unnecessary -ENOMEM messages
> >       iio: health: Drop unnecessary -ENOMEM messages
> >       iio: humidity: Drop unnecessary -ENOMEM messages
> >       iio: light: Drop unnecessary -ENOMEM messages
> >       iio: potentiostat: Drop unnecessary -ENOMEM messages
> >       iio: pressure: Drop unnecessary -ENOMEM messages
> >       iio: proximity: Drop unnecessary -ENOMEM messages
> >       iio: temperature: Drop unnecessary -ENOMEM messages
> > 
> >  drivers/iio/accel/bma220_spi.c      | 4 +---
> >  drivers/iio/accel/dmard06.c         | 4 +---
> >  drivers/iio/accel/dmard09.c         | 4 +---
> >  drivers/iio/accel/dmard10.c         | 4 +---
> >  drivers/iio/accel/mc3230.c          | 4 +---
> >  drivers/iio/accel/mma7660.c         | 4 +---
> >  drivers/iio/accel/stk8312.c         | 4 +---
> >  drivers/iio/accel/stk8ba50.c        | 4 +---
> >  drivers/iio/adc/ad7949.c            | 4 +---
> >  drivers/iio/adc/bcm_iproc_adc.c     | 4 +---
> >  drivers/iio/adc/cpcap-adc.c         | 6 ++----
> >  drivers/iio/adc/da9150-gpadc.c      | 5 ++---
> >  drivers/iio/adc/dln2-adc.c          | 9 +++------
> >  drivers/iio/adc/exynos_adc.c        | 4 +---
> >  drivers/iio/adc/imx7d_adc.c         | 4 +---
> >  drivers/iio/adc/imx8qxp-adc.c       | 4 +---
> >  drivers/iio/adc/mxs-lradc-adc.c     | 4 +---
> >  drivers/iio/adc/palmas_gpadc.c      | 4 +---
> >  drivers/iio/adc/rn5t618-adc.c       | 4 +---
> >  drivers/iio/adc/stm32-dfsdm-adc.c   | 4 +---
> >  drivers/iio/adc/stmpe-adc.c         | 4 +---
> >  drivers/iio/adc/ti-adc084s021.c     | 4 +---
> >  drivers/iio/adc/ti-ads131e08.c      | 8 ++------
> >  drivers/iio/adc/ti_am335x_adc.c     | 5 ++---
> >  drivers/iio/adc/twl4030-madc.c      | 4 +---
> >  drivers/iio/adc/viperboard_adc.c    | 4 +---
> >  drivers/iio/dac/ad5380.c            | 4 +---
> >  drivers/iio/dac/ad5764.c            | 4 +---
> >  drivers/iio/dac/ds4424.c            | 4 +---
> >  drivers/iio/dac/ti-dac7311.c        | 4 +---
> >  drivers/iio/dac/vf610_dac.c         | 4 +---
> >  drivers/iio/health/afe4403.c        | 4 +---
> >  drivers/iio/health/afe4404.c        | 4 +---
> >  drivers/iio/humidity/am2315.c       | 4 +---
> >  drivers/iio/humidity/dht11.c        | 4 +---
> >  drivers/iio/light/stk3310.c         | 4 +---
> >  drivers/iio/potentiostat/lmp91000.c | 4 +---
> >  drivers/iio/pressure/dlhl60d.c      | 4 +---
> >  drivers/iio/proximity/ping.c        | 4 +---
> >  drivers/iio/proximity/srf04.c       | 4 +---
> >  drivers/iio/temperature/mlx90632.c  | 4 +---
> >  41 files changed, 47 insertions(+), 130 deletions(-)
> > ---
> > base-commit: d7b8f8e20813f0179d8ef519541a3527e7661d3a
> > change-id: 20250822-enomam_logs-f66642957fb3
> > 
> > Best regards,  
> 
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages
  2025-08-25 11:39   ` Jonathan Cameron
@ 2025-08-26  2:42     ` Dixit Parmar
  0 siblings, 0 replies; 21+ messages in thread
From: Dixit Parmar @ 2025-08-26  2:42 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Lars-Peter Clausen,
	Michael Hennerich, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Support Opensource,
	Krzysztof Kozlowski, Alim Akhtar, Haibo Chen, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Cai Huoqing,
	Maxime Coquelin, Alexandre Torgue, Andreas Klinger, Crt Mori,
	linux-iio, linux-kernel, linux-arm-kernel, linux-samsung-soc, imx,
	linux-stm32

On Mon, Aug 25, 2025 at 12:39:19PM +0100, Jonathan Cameron wrote:
> On Mon, 25 Aug 2025 09:31:50 +0100
> Jonathan Cameron <jic23@kernel.org> wrote:
> 
> > On Fri, 22 Aug 2025 09:19:48 +0530
> > Dixit Parmar <dixitparmar19@gmail.com> wrote:
> > 
> > > The drivers do not require their own error messages for error
> > > -ENOMEM, memory allocation failures. So remove the dev_err
> > > messages from the probe().
> > > With these patches, all the iio drivers now has uniform handling
> > > of the -ENOMEM while device_allocation and trigger_allocation
> > > calls.
> > > 
> > > Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>  
> > Series looks fine to me, after the minor tweaks to commit messages
> > that Andy requested.  However as it touches a lot of drivers
> > I'd like to leave it on list a little longer.
> 
> I changed my mind after taking the dev_err_probe() series earlier.
> I'm rather too busy at the moment, so clearing this out now will reduce
> what I need to keep track of.
> 
> Fixed up the () that Andy asked for in commit messages and applied
> to the togreg branch of iio.git, pushed out initially as testing.
> 
> There is still the rest of the week (probably) in which I can add
> tags etc if anyone wants to give them before I push that out as
> a non rebasing tree.
> 
> Thanks,
> 
> Jonathan
Thanks Jonathan.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-08-26  2:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22  3:49 [PATCH 00/10] iio: Drop unnecessary -ENOMEM messages Dixit Parmar
2025-08-22  3:49 ` [PATCH 01/10] iio: accel: " Dixit Parmar
2025-08-22  9:39   ` Andy Shevchenko
2025-08-22  3:49 ` [PATCH 02/10] iio: adc: " Dixit Parmar
2025-08-22  9:41   ` Andy Shevchenko
2025-08-22  3:49 ` [PATCH 03/10] iio: dac: " Dixit Parmar
2025-08-25 11:31   ` Jonathan Cameron
2025-08-22  3:49 ` [PATCH 04/10] iio: health: " Dixit Parmar
2025-08-25 11:35   ` Jonathan Cameron
2025-08-22  3:49 ` [PATCH 05/10] iio: humidity: " Dixit Parmar
2025-08-22  3:49 ` [PATCH 06/10] iio: light: " Dixit Parmar
2025-08-22  3:49 ` [PATCH 07/10] iio: potentiostat: " Dixit Parmar
2025-08-22  3:49 ` [PATCH 08/10] iio: pressure: " Dixit Parmar
2025-08-22  3:49 ` [PATCH 09/10] iio: proximity: " Dixit Parmar
2025-08-22  3:49 ` [PATCH 10/10] iio: temperature: " Dixit Parmar
2025-08-22  6:19 ` [PATCH 00/10] iio: " Andy Shevchenko
2025-08-22  9:28   ` Dixit Parmar
2025-08-22  9:37     ` Andy Shevchenko
2025-08-25  8:31 ` Jonathan Cameron
2025-08-25 11:39   ` Jonathan Cameron
2025-08-26  2:42     ` Dixit Parmar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).