[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250825123508.7f9e9271@jic23-huawei>
Date: Mon, 25 Aug 2025 12:35:08 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Dixit Parmar <dixitparmar19@...il.com>
Cc: David Lechner <dlechner@...libre.com>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>, Lars-Peter Clausen
<lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>, Ray
Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>, Broadcom
internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Support Opensource <support.opensource@...semi.com>, Krzysztof Kozlowski
<krzk@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>, Haibo Chen
<haibo.chen@....com>, Shawn Guo <shawnguo@...nel.org>, Sascha Hauer
<s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Cai Huoqing <cai.huoqing@...ux.dev>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue
<alexandre.torgue@...s.st.com>, Andreas Klinger <ak@...klinger.de>, Crt
Mori <cmo@...exis.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, imx@...ts.linux.dev,
linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH 04/10] iio: health: Drop unnecessary -ENOMEM messages
On Fri, 22 Aug 2025 09:19:52 +0530
Dixit Parmar <dixitparmar19@...il.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@...il.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);
>
>
Powered by blists - more mailing lists