mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-20 14:41:58 +00:00
clk: fix error check for devm_clk_get_optional()
If skip all return error number, it may skip some real error cases, so only skip the error when the clock is not provided in DTS Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
This commit is contained in:
parent
5f82a940a0
commit
0f9b2b3ddf
1 changed files with 1 additions and 1 deletions
|
@ -678,7 +678,7 @@ struct clk *devm_clk_get_optional(struct udevice *dev, const char *id)
|
|||
{
|
||||
struct clk *clk = devm_clk_get(dev, id);
|
||||
|
||||
if (IS_ERR(clk))
|
||||
if (PTR_ERR(clk) == -ENODATA)
|
||||
return NULL;
|
||||
|
||||
return clk;
|
||||
|
|
Loading…
Reference in a new issue