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: <c2464c65-836d-4609-b40b-2e3df4012688@wanadoo.fr>
Date: Thu, 29 Aug 2024 18:59:03 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Yan Zhen <yanzhen@...o.com>, andersson@...nel.org,
 mturquette@...libre.com, sboyd@...nel.org
Cc: linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
 linux-kernel@...r.kernel.org, opensource.kernel@...o.com
Subject: Re: [PATCH v3] clk: qcom: Fix error checking for
 devm_clk_hw_get_clk()

Le 27/08/2024 à 04:52, Yan Zhen a écrit :
> The devm_clk_hw_get_clk() function returns error pointers.
> It never returns NULL.  Update the check accordingly.
> 
> Fixes: 8737ec830ee3 ("clk: qcom: common: Add interconnect clocks support")'
> Signed-off-by: Yan Zhen <yanzhen@...o.com>
> ---
> 
> Changes in v3:
> - Providing a "fixes" tag blaming the commit.
> 
>   drivers/clk/qcom/common.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
> index 33cc1f73c69d..5a9e653916ea 100644
> --- a/drivers/clk/qcom/common.c
> +++ b/drivers/clk/qcom/common.c
> @@ -273,8 +273,8 @@ static int qcom_cc_icc_register(struct device *dev,
>   		icd[i].slave_id = desc->icc_hws[i].slave_id;
>   		hws = &desc->clks[desc->icc_hws[i].clk_id]->hw;
>   		icd[i].clk = devm_clk_hw_get_clk(dev, hws, "icc");
> -		if (!icd[i].clk)
> -			return dev_err_probe(dev, -ENOENT,
> +		if (IS_ERR(icd[i].clk))
> +			return dev_err_probe(dev, PTR_ERR(icd[i].clk),
>   					     "(%d) clock entry is null\n", i);

Nitpick: Maybe the message could be updated as-well?

CJ

>   		icd[i].name = clk_hw_get_name(hws);
>   	}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ