mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clk: si5341: fix an error code problem in si5341_output_clk_set_rate
@ 2023-10-31  2:02 Su Hui
  2023-10-31 12:27 ` mike.looijmans
  0 siblings, 1 reply; 2+ messages in thread
From: Su Hui @ 2023-10-31  2:02 UTC (permalink / raw)
  To: mturquette, sboyd
  Cc: Su Hui, mike.looijmans, linux-clk, linux-kernel, kernel-janitors

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@nfschina.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)
-- 
2.30.2


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

end of thread, other threads:[~2023-10-31 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31  2:02 [PATCH] clk: si5341: fix an error code problem in si5341_output_clk_set_rate Su Hui
2023-10-31 12:27 ` mike.looijmans

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

all inboxes | Powered by JetHome®