diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2019-10-22 14:00:03 +0200 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2019-10-22 16:14:05 +0200 |
commit | 8a1661f20e6cdda682820eba9ccc79bff5a3d7f8 (patch) | |
tree | a07d59642b0f8e6e4a7ec8806088df3c6e80d4a6 /include/clk.h | |
parent | 727fa4539ca2937fd3d8d748096af1145bdf2173 (diff) | |
download | u-boot-8a1661f20e6cdda682820eba9ccc79bff5a3d7f8.tar.gz |
drivers: clk: Handle gracefully NULL pointers
Prepare the way for a managed CLK API by handling NULL pointers without
crashing nor failing.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'include/clk.h')
-rw-r--r-- | include/clk.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clk.h b/include/clk.h index 18b2e3ca54..6568865d40 100644 --- a/include/clk.h +++ b/include/clk.h @@ -356,7 +356,7 @@ int soc_clk_dump(void); */ static inline bool clk_valid(struct clk *clk) { - return !!clk->dev; + return clk && !!clk->dev; } /** |