projects
/
profile
/
common
/
platform
/
kernel
/
u-boot-artik.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
672754a
)
usb: ums: add error handling for failed registration
author
Stephen Warren
<swarren@nvidia.com>
Thu, 1 May 2014 21:42:10 +0000
(15:42 -0600)
committer
Chanho Park
<chanho61.park@samsung.com>
Fri, 24 Jul 2015 07:29:58 +0000
(16:29 +0900)
Without this, if g_dnl_register() fails, the UMS code continues on
blindly and crashes. This fix makes it simply print an error message
instead.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
common/cmd_usb_mass_storage.c
patch
|
blob
|
history
diff --git
a/common/cmd_usb_mass_storage.c
b/common/cmd_usb_mass_storage.c
index d442ba60d980c4f2d21311a7603e247a39218502..1cd497270629f85145cfc0acb0db15a14912ae71 100644
(file)
--- a/
common/cmd_usb_mass_storage.c
+++ b/
common/cmd_usb_mass_storage.c
@@
-53,7
+53,11
@@
int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
}
- g_dnl_register("usb_dnl_ums");
+ rc = g_dnl_register("usb_dnl_ums");
+ if (rc) {
+ error("g_dnl_register failed");
+ return CMD_RET_FAILURE;
+ }
/* Timeout unit: seconds */
int cable_ready_timeout = UMS_CABLE_READY_TIMEOUT;