clk: check hw and hw->dev before dereference it
Check hw and hw->dev before dereference it. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ba2a0cbb05
commit
b04da9fcf7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user