commit | b04da9fcf78e233e70ea5ace757c0b8b95bb2459 | [log] [tgz] |
---|---|---|
author | Claudiu Beznea <claudiu.beznea@microchip.com> | Mon Sep 07 17:46:32 2020 +0300 |
committer | Eugen Hristev <eugen.hristev@microchip.com> | Tue Sep 22 11:27:18 2020 +0300 |
tree | 75037cc785cc53d8ac658065d2c5b0462413f0f2 | |
parent | ba2a0cbb053951ed6d36161989d38da724696b4d [diff] [blame] |
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>
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 786f4e8..319808d 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c
@@ -57,6 +57,9 @@ const char *clk_hw_get_name(const struct clk *hw) { + assert(hw); + assert(hw->dev); + return hw->dev->name; }