Skip to content

Commit 5607068

Browse files
Su Huibebarino
authored andcommitted
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: 3044a86 ("clk: Add Si5341/Si5340 driver") Acked-by: Mike Looijmans <[email protected]> Signed-off-by: Su Hui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 2c973fb commit 5607068

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/clk-si5341.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,8 @@ static int si5341_output_clk_set_rate(struct clk_hw *hw, unsigned long rate,
895895
r[0] = r_div ? (r_div & 0xff) : 1;
896896
r[1] = (r_div >> 8) & 0xff;
897897
r[2] = (r_div >> 16) & 0xff;
898-
err = regmap_bulk_write(output->data->regmap,
898+
return regmap_bulk_write(output->data->regmap,
899899
SI5341_OUT_R_REG(output), r, 3);
900-
901-
return 0;
902900
}
903901

904902
static int si5341_output_reparent(struct clk_si5341_output *output, u8 index)

0 commit comments

Comments
 (0)