projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a725e2
)
clk: do not attempt to fetch clock pointer with null device
author
Tero Kristo
<t-kristo@ti.com>
Fri, 11 Jun 2021 08:45:08 +0000
(11:45 +0300)
committer
Lokesh Vutla
<lokeshvutla@ti.com>
Fri, 11 Jun 2021 11:04:52 +0000
(16:34 +0530)
Bail out early if device returned for the parent clock is null.
This avoids warning prints like this when doing clk dump:
dev_get_uclass_priv: null device
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tero Kristo <kristo@kernel.org>
drivers/clk/clk-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/clk/clk-uclass.c
b/drivers/clk/clk-uclass.c
index
53e7be7
..
451d7da
100644
(file)
--- a/
drivers/clk/clk-uclass.c
+++ b/
drivers/clk/clk-uclass.c
@@
-502,6
+502,8
@@
struct clk *clk_get_parent(struct clk *clk)
return NULL;
pdev = dev_get_parent(clk->dev);
+ if (!pdev)
+ return ERR_PTR(-ENODEV);
pclk = dev_get_clk_ptr(pdev);
if (!pclk)
return ERR_PTR(-ENODEV);