mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-28 22:21:49 +01: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
@ -57,6 +57,9 @@ ulong clk_generic_get_rate(struct clk *clk)
|
|||||||
|
|
||||||
const char *clk_hw_get_name(const struct clk *hw)
|
const char *clk_hw_get_name(const struct clk *hw)
|
||||||
{
|
{
|
||||||
|
assert(hw);
|
||||||
|
assert(hw->dev);
|
||||||
|
|
||||||
return hw->dev->name;
|
return hw->dev->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user