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] [day] [month] [year] [list]
Message-ID: <470f8e79-4fa3-4d02-8e24-3cca5c4fe33a@oss.qualcomm.com>
Date: Wed, 17 Dec 2025 11:04:59 +0100
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Haotian Zhang <vulab@...as.ac.cn>, Bjorn Andersson
 <andersson@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: qcom: Return correct error code in
 qcom_cc_probe_by_index()

On 12/17/25 5:13 AM, Haotian Zhang wrote:
> When devm_platform_ioremap_resource() fails, it returns various
> error codes. Returning a hardcoded -ENOMEM masks the actual
> failure reason.
> 
> Use PTR_ERR() to propagate the actual error code returned by
> devm_platform_ioremap_resource() instead of -ENOMEM.
> 
> Fixes: 75e0a1e30191 ("clk: qcom: define probe by index API as common API")
> Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
> ---
>  drivers/clk/qcom/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
> index 121591886774..eec369d2173b 100644
> --- a/drivers/clk/qcom/common.c
> +++ b/drivers/clk/qcom/common.c
> @@ -454,7 +454,7 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index,
>  
>  	base = devm_platform_ioremap_resource(pdev, index);
>  	if (IS_ERR(base))
> -		return -ENOMEM;
> +		return PTR_ERR(base);

Nice find!

Reviewed-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>

Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ