[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251221120413.7f1fa877@jic23-huawei>
Date: Sun, 21 Dec 2025 12:04:13 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>
Cc: David Lechner <dlechner@...libre.com>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>, Joel Stanley
<joel@....id.au>, Andrew Jeffery <andrew@...econstruct.com.au>, Krzysztof
Kozlowski <krzk@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>, Heiko
Stuebner <heiko@...ech.de>, Orson Zhai <orsonzhai@...il.com>, Baolin Wang
<baolin.wang@...ux.alibaba.com>, Chunyan Zhang <zhang.lyra@...il.com>,
linux-iio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-aspeed@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH 1/5] iio: adc: aspeed: Simplify with dev_err_probe
On Fri, 19 Dec 2025 15:31:50 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com> wrote:
> Use dev_err_probe() to make error code handling simpler and handle
> deferred probe nicely (avoid spamming logs).
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>
Not a comment on this patch as such, but this would benefit from a local
struct device *dev
> ---
> drivers/iio/adc/aspeed_adc.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c
> index bf2bfd6bdc41..1ae45fe90e6c 100644
> --- a/drivers/iio/adc/aspeed_adc.c
> +++ b/drivers/iio/adc/aspeed_adc.c
> @@ -535,11 +535,10 @@ static int aspeed_adc_probe(struct platform_device *pdev)
> return PTR_ERR(data->clk_scaler);
>
> data->rst = devm_reset_control_get_shared(&pdev->dev, NULL);
> - if (IS_ERR(data->rst)) {
> - dev_err(&pdev->dev,
> - "invalid or missing reset controller device tree entry");
> - return PTR_ERR(data->rst);
> - }
> + if (IS_ERR(data->rst))
> + return dev_err_probe(&pdev->dev, PTR_ERR(data->rst),
> + "invalid or missing reset controller device tree entry");
> +
> reset_control_deassert(data->rst);
>
> ret = devm_add_action_or_reset(data->dev, aspeed_adc_reset_assert,
>
Powered by blists - more mailing lists