projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
clk: Fix clk_core_get NULL dereference
[linux-2.6-microblaze.git]
/
drivers
/
clk
/
clk.c
diff --git
a/drivers/clk/clk.c
b/drivers/clk/clk.c
index
2253c15
..
20c4b28
100644
(file)
--- a/
drivers/clk/clk.c
+++ b/
drivers/clk/clk.c
@@
-418,6
+418,9
@@
static struct clk_core *clk_core_get(struct clk_core *core, u8 p_index)
if (IS_ERR(hw))
return ERR_CAST(hw);
+ if (!hw)
+ return NULL;
+
return hw->core;
}