public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] clk: si5341: fix an error code problem in si5341_output_clk_set_rate
@ 2023-11-01  3:16 Su Hui
  2023-12-18  1:46 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Su Hui @ 2023-11-01  3:16 UTC (permalink / raw)
  To: mike.looijmans, mturquette, sboyd
  Cc: Su Hui, linux-clk, linux-kernel, kernel-janitors

regmap_bulk_write() return zero or negative error code, return the value
of regmap_bulk_write() rather than '0'.

Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver")
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Su Hui <suhui@nfschina.com>
---
 drivers/clk/clk-si5341.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
index 9599857842c7..2920fe2e5e8b 100644
--- a/drivers/clk/clk-si5341.c
+++ b/drivers/clk/clk-si5341.c
@@ -895,10 +895,8 @@ static int si5341_output_clk_set_rate(struct clk_hw *hw, unsigned long rate,
 	r[0] = r_div ? (r_div & 0xff) : 1;
 	r[1] = (r_div >> 8) & 0xff;
 	r[2] = (r_div >> 16) & 0xff;
-	err = regmap_bulk_write(output->data->regmap,
+	return regmap_bulk_write(output->data->regmap,
 			SI5341_OUT_R_REG(output), r, 3);
-
-	return 0;
 }
 
 static int si5341_output_reparent(struct clk_si5341_output *output, u8 index)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] clk: si5341: fix an error code problem in si5341_output_clk_set_rate
  2023-11-01  3:16 [PATCH v2] clk: si5341: fix an error code problem in si5341_output_clk_set_rate Su Hui
@ 2023-12-18  1:46 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-12-18  1:46 UTC (permalink / raw)
  To: Su Hui, mike.looijmans, mturquette
  Cc: Su Hui, linux-clk, linux-kernel, kernel-janitors

Quoting Su Hui (2023-10-31 20:16:36)
> regmap_bulk_write() return zero or negative error code, return the value
> of regmap_bulk_write() rather than '0'.
> 
> Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver")
> Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
> Signed-off-by: Su Hui <suhui@nfschina.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-18  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01  3:16 [PATCH v2] clk: si5341: fix an error code problem in si5341_output_clk_set_rate Su Hui
2023-12-18  1:46 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox