projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d74d6b4
)
syscon: Avoid returning a device on failure
author
Simon Glass
<sjg@chromium.org>
Sat, 12 Mar 2016 05:06:49 +0000
(22:06 -0700)
committer
Bin Meng
<bmeng.cn@gmail.com>
Thu, 17 Mar 2016 02:27:24 +0000
(10:27 +0800)
If the device cannot be probed, syscon_get_by_driver_data() will still
return a useful value in its devp parameter. Ensure that it returns NULL
instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/core/syscon-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/core/syscon-uclass.c
b/drivers/core/syscon-uclass.c
index a0666d0bacd7e2d8cfcaca0f8ae13d85f7256873..e03f46af5739d7156ad0270a438e4744496e535f 100644
(file)
--- a/
drivers/core/syscon-uclass.c
+++ b/
drivers/core/syscon-uclass.c
@@
-38,6
+38,7
@@
int syscon_get_by_driver_data(ulong driver_data, struct udevice **devp)
struct uclass *uc;
int ret;
+ *devp = NULL;
ret = uclass_get(UCLASS_SYSCON, &uc);
if (ret)
return ret;