projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03ff014
)
rk30: clock: clk_get_parent return error when clk invalid
author
黄涛
<huangtao@rock-chips.com>
Mon, 7 May 2012 12:11:36 +0000
(20:11 +0800)
committer
黄涛
<huangtao@rock-chips.com>
Mon, 7 May 2012 12:24:16 +0000
(20:24 +0800)
arch/arm/mach-rk30/clock.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-rk30/clock.c
b/arch/arm/mach-rk30/clock.c
index 572e59e2f9edfcd574dd64410c7b92236ad136fa..6950186b5cf31cea66a1d4f9aa686eaf086c2489 100755
(executable)
--- a/
arch/arm/mach-rk30/clock.c
+++ b/
arch/arm/mach-rk30/clock.c
@@
-445,6
+445,9
@@
struct clk *rk30_clk_get_parent(struct clk *clk)
struct clk *clk_get_parent(struct clk *clk)
#endif
{
+ if (clk == NULL || IS_ERR(clk)) {
+ return ERR_PTR(-EINVAL);
+ }
return clk->parent;
}