lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <kiingkxvtdyuuyabn5acfsvpazolso6yvlsmzacxilos2jwanp@dsvceugddgep>
Date: Tue, 9 Jul 2024 14:12:16 -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 10/12] thermal/drivers/qcom-tsens: simplify with
 dev_err_probe()

On Tue, Jul 09, 2024 at 02:59:40PM 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/tsens.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index e76e23026dc8..0b4421bf4785 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -1336,11 +1336,9 @@ static int tsens_probe(struct platform_device *pdev)
>  
>  	if (priv->ops->calibrate) {
>  		ret = priv->ops->calibrate(priv);
> -		if (ret < 0) {
> -			if (ret != -EPROBE_DEFER)
> -				dev_err(dev, "%s: calibration failed\n", __func__);
> -			return ret;
> -		}
> +		if (ret < 0)
> +			return dev_err_probe(dev, ret, "%s: calibration failed\n",
> +					     __func__);
>  	}
>  
>  	ret = tsens_register(priv);
> 
> -- 
> 2.43.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ