Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: si5341: fix an error code problem in si5341_output_clk_set_rate

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>
Link: https://lore.kernel.org/r/20231101031633.996124-1-suhui@nfschina.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Su Hui and committed by
Stephen Boyd
5607068a 2c973fb5

+1 -3
+1 -3
drivers/clk/clk-si5341.c
··· 895 895 r[0] = r_div ? (r_div & 0xff) : 1; 896 896 r[1] = (r_div >> 8) & 0xff; 897 897 r[2] = (r_div >> 16) & 0xff; 898 - err = regmap_bulk_write(output->data->regmap, 898 + return regmap_bulk_write(output->data->regmap, 899 899 SI5341_OUT_R_REG(output), r, 3); 900 - 901 - return 0; 902 900 } 903 901 904 902 static int si5341_output_reparent(struct clk_si5341_output *output, u8 index)