提交 7efb4a6e 编写于 作者: B Bin Meng 提交者: Simon Glass

dm: timer: Skip device that does not have a valid ofnode in pre_probe()

It is possible that a timer device has a null ofnode, hence there is
no need to further parse DT for the clock rate.
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 e3665ba9
......@@ -48,6 +48,10 @@ static int timer_pre_probe(struct udevice *dev)
int err;
ulong ret;
/* It is possible that a timer device has a null ofnode */
if (!dev_of_valid(dev))
return 0;
err = clk_get_by_index(dev, 0, &timer_clk);
if (!err) {
ret = clk_get_rate(&timer_clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册