projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f82a94
)
clk: fix error check for devm_clk_get_optional()
author
Chunfeng Yun
<chunfeng.yun@mediatek.com>
Thu, 9 Jan 2020 03:35:05 +0000
(11:35 +0800)
committer
Tom Rini
<trini@konsulko.com>
Thu, 16 Jan 2020 14:39:45 +0000
(09:39 -0500)
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>
drivers/clk/clk-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/clk/clk-uclass.c
b/drivers/clk/clk-uclass.c
index 9aa8537004a339ce910751bedafdf0d4ee9ea50c..2778b504c0f8754e81c6b7e602148131d6fe37d9 100644
(file)
--- a/
drivers/clk/clk-uclass.c
+++ b/
drivers/clk/clk-uclass.c
@@
-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;