aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2019-09-26 15:42:42 +0200
committerLukasz Majewski <lukma@denx.de>2019-10-22 16:14:05 +0200
commit02e2a2ad2f01a5b88e3ff2b694de63c0b5c849f2 (patch)
tree011b25ec616a39a6a7ac255e12c7c84c6b19114d /drivers/clk
parent44510daea4d07fee736dd90411c4b503340b449e (diff)
downloadu-boot-02e2a2ad2f01a5b88e3ff2b694de63c0b5c849f2.zip
u-boot-02e2a2ad2f01a5b88e3ff2b694de63c0b5c849f2.tar.gz
u-boot-02e2a2ad2f01a5b88e3ff2b694de63c0b5c849f2.tar.bz2
clk: Fix error check in clk_set_default_parents()
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 64c181f..bf1adc0 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;