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>
This commit is contained in:
committed by
Lukasz Majewski
parent
44510daea4
commit
02e2a2ad2f
@@ -223,7 +223,7 @@ static int clk_set_default_parents(struct udevice *dev)
|
|||||||
if (ret == -ENOSYS)
|
if (ret == -ENOSYS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ret) {
|
if (ret < 0) {
|
||||||
debug("%s: failed to reparent clock %d for %s\n",
|
debug("%s: failed to reparent clock %d for %s\n",
|
||||||
__func__, index, dev_read_name(dev));
|
__func__, index, dev_read_name(dev));
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user