dm: core: Call clk_set_defaults() during probe() only for a valid ofnode
Without a valid ofnode, it's meaningless to call clk_set_defaults() to process various properties. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7efb4a6e09
commit
a1f99e4666
@ -409,10 +409,16 @@ int device_probe(struct udevice *dev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Process 'assigned-{clocks/clock-parents/clock-rates}' properties */
|
||||
ret = clk_set_defaults(dev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
/* Only handle devices that have a valid ofnode */
|
||||
if (dev_of_valid(dev)) {
|
||||
/*
|
||||
* Process 'assigned-{clocks/clock-parents/clock-rates}'
|
||||
* properties
|
||||
*/
|
||||
ret = clk_set_defaults(dev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (drv->probe) {
|
||||
ret = drv->probe(dev);
|
||||
|
Loading…
Reference in New Issue
Block a user