projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba2a0cb
)
clk: check hw and hw->dev before dereference it
author
Claudiu Beznea
<claudiu.beznea@microchip.com>
Mon, 7 Sep 2020 14:46:32 +0000
(17:46 +0300)
committer
Eugen Hristev
<eugen.hristev@microchip.com>
Tue, 22 Sep 2020 08:27:18 +0000
(11:27 +0300)
Check hw and hw->dev before dereference it.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/clk/clk.c
patch
|
blob
|
history
diff --git
a/drivers/clk/clk.c
b/drivers/clk/clk.c
index
786f4e8
..
319808d
100644
(file)
--- a/
drivers/clk/clk.c
+++ b/
drivers/clk/clk.c
@@
-57,6
+57,9
@@
ulong clk_generic_get_rate(struct clk *clk)
const char *clk_hw_get_name(const struct clk *hw)
{
+ assert(hw);
+ assert(hw->dev);
+
return hw->dev->name;
}