[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <kytoekbx4t52dynndilmbham45ufvsnhbnel6vmjmn4iztdc3c@an4jnvq57gw7>
Date: Tue, 9 Jul 2024 14:11:05 -0500
From: Bjorn Andersson <andersson@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>, Florian Fainelli <florian.fainelli@...adcom.com>,
Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
Krzysztof Kozlowski <krzk@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
Amit Kucheria <amitk@...nel.org>, Thara Gopinath <thara.gopinath@...il.com>,
linux-pm@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 09/12] thermal/drivers/qcom-spmi-adc-tm5: simplify with
dev_err_probe()
On Tue, Jul 09, 2024 at 02:59:39PM GMT, Krzysztof Kozlowski wrote:
> Error handling in probe() can be a bit simpler with dev_err_probe().
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Reviewed-by: Bjorn Andersson <andersson@...nel.org>
Regards,
Bjorn
> ---
> drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index 756ac6842ff9..7c9f4023babc 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -829,12 +829,9 @@ static int adc_tm5_get_dt_channel_data(struct adc_tm5_chip *adc_tm,
>
> channel->iio = devm_fwnode_iio_channel_get_by_name(adc_tm->dev,
> of_fwnode_handle(node), NULL);
> - if (IS_ERR(channel->iio)) {
> - ret = PTR_ERR(channel->iio);
> - if (ret != -EPROBE_DEFER)
> - dev_err(dev, "%s: error getting channel: %d\n", name, ret);
> - return ret;
> - }
> + if (IS_ERR(channel->iio))
> + return dev_err_probe(dev, PTR_ERR(channel->iio), "%s: error getting channel\n",
> + name);
>
> ret = of_property_read_u32_array(node, "qcom,pre-scaling", varr, 2);
> if (!ret) {
>
> --
> 2.43.0
>
>
Powered by blists - more mailing lists