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: <894145dc-46fb-451f-a461-d0b9ff1e50dd@kernel.org>
Date: Fri, 30 Aug 2024 10:08:41 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Yu Jiaoliang <yujiaoliang@...o.com>,
 Bjorn Andersson <andersson@...nel.org>,
 Konrad Dybcio <konradybcio@...nel.org>, linux-arm-msm@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: Re: [PATCH v1] soc: qcom: pbs: Simplify with dev_err_probe()

On 29/08/2024 14:48, Yu Jiaoliang wrote:
> Error handling in probe() can be a bit simpler with dev_err_probe().
> 
> Signed-off-by: Yu Jiaoliang <yujiaoliang@...o.com>
> ---
>  drivers/soc/qcom/qcom-pbs.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/qcom/qcom-pbs.c b/drivers/soc/qcom/qcom-pbs.c
> index 77a70d3d0d0b..ab9de12ec901 100644
> --- a/drivers/soc/qcom/qcom-pbs.c
> +++ b/drivers/soc/qcom/qcom-pbs.c
> @@ -201,10 +201,9 @@ static int qcom_pbs_probe(struct platform_device *pdev)
>  	}
>  
>  	ret = device_property_read_u32(pbs->dev, "reg", &val);
> -	if (ret < 0) {
> -		dev_err(pbs->dev, "Couldn't find reg, ret = %d\n", ret);
> -		return ret;
> -	}
> +	if (ret < 0)
> +		return dev_err_probe(pbs->dev, ret, "Couldn't find reg\n");

This cannot defer, so not much benefits. And you ignore other place in
the probe()... That's like a weird pattern with all your patches change
something irrelevant, but leave other places unchanged.

That's pointless and churn.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ