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: <b5b3abbd-1551-34ac-65b4-4fb14e24d3f2@topic.nl>
Date:   Tue, 31 Oct 2023 13:27:21 +0100
From:   <mike.looijmans@...ic.nl>
To:     Su Hui <suhui@...china.com>, mturquette@...libre.com,
        sboyd@...nel.org
CC:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] clk: si5341: fix an error code problem in
 si5341_output_clk_set_rate

FWIW, you have my gratitude...

Acked-By: Mike Looijmans <mike.looijmans@...ic.nl>

One remark, maybe just "return regmap_...." straightaway and skip the 
"err = " assignment.

M.

On 31-10-2023 03:02, Su Hui wrote:
> regmap_bulk_write() return zero or negative error code, return 'err'
> rather than '0'.
>
> Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver")
> Signed-off-by: Su Hui <suhui@...china.com>
> ---
>   drivers/clk/clk-si5341.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
> index 9599857842c7..9b1cc5a83b5b 100644
> --- a/drivers/clk/clk-si5341.c
> +++ b/drivers/clk/clk-si5341.c
> @@ -898,7 +898,7 @@ static int si5341_output_clk_set_rate(struct clk_hw *hw, unsigned long rate,
>   	err = regmap_bulk_write(output->data->regmap,
>   			SI5341_OUT_R_REG(output), r, 3);
>   
> -	return 0;
> +	return err;
>   }
>   
>   static int si5341_output_reparent(struct clk_si5341_output *output, u8 index)


-- 
Mike Looijmans
System Expert

TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@...ic.nl
W: www.topic.nl



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ