[U-Boot] [PATCH] clk: Fix error check in clk_set_default_parents()

26 Sep
2019
26 Sep
'19
3:42 p.m.
According to the documentation in clk.h, clk_set_parent() return the new rate of the clock or a negative error code.
Signed-off-by: Jean-Jacques Hiblot jjhiblot@ti.com --- drivers/clk/clk-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 64c181f4ad..bf1adc09ab 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -223,7 +223,7 @@ static int clk_set_default_parents(struct udevice *dev) if (ret == -ENOSYS) continue;
- if (ret) { + if (ret < 0) { debug("%s: failed to reparent clock %d for %s\n", __func__, index, dev_read_name(dev)); return ret;
--
2.17.1
2053
Age (days ago)
2053
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jean-Jacques Hiblot