1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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>
This commit is contained in:
Jean-Jacques Hiblot
2019-10-22 14:00:03 +02:00
committed by Lukasz Majewski
parent 727fa4539c
commit 8a1661f20e
2 changed files with 37 additions and 8 deletions

View File

@@ -356,7 +356,7 @@ int soc_clk_dump(void);
*/
static inline bool clk_valid(struct clk *clk)
{
return !!clk->dev;
return clk && !!clk->dev;
}
/**