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:
Samuel Holland 2022-12-04 15:10:36 -06:00
parent bae28dd7f7
commit 8de411e06a

View File

@ -490,7 +490,7 @@ struct clk *clk_get_parent(struct clk *clk)
debug("%s(clk=%p)\n", __func__, clk);
if (!clk_valid(clk))
return NULL;
return ERR_PTR(-ENODEV);
pdev = dev_get_parent(clk->dev);
if (!pdev)