mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue