mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-18 14:48:17 +01:00
clk: Fix error handling in clk_get_parent()
Do not return both NULL and error pointers. The function is only documented as returning error pointers. Fixes: 8a1661f20e6c ("drivers: clk: Handle gracefully NULL pointers") Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
bae28dd7f7
commit
8de411e06a
@ -490,7 +490,7 @@ struct clk *clk_get_parent(struct clk *clk)
|
|||||||
|
|
||||||
debug("%s(clk=%p)\n", __func__, clk);
|
debug("%s(clk=%p)\n", __func__, clk);
|
||||||
if (!clk_valid(clk))
|
if (!clk_valid(clk))
|
||||||
return NULL;
|
return ERR_PTR(-ENODEV);
|
||||||
|
|
||||||
pdev = dev_get_parent(clk->dev);
|
pdev = dev_get_parent(clk->dev);
|
||||||
if (!pdev)
|
if (!pdev)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user