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:
committed by
Lukasz Majewski
parent
727fa4539c
commit
8a1661f20e
@@ -356,7 +356,7 @@ int soc_clk_dump(void);
|
||||
*/
|
||||
static inline bool clk_valid(struct clk *clk)
|
||||
{
|
||||
return !!clk->dev;
|
||||
return clk && !!clk->dev;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user