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:
340ed42
)
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
Lukasz Majewski
<l.majewski@samsung.com>
Thu, 8 May 2014 08:38:29 +0000
(10:38 +0200)
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 d8d9efd4f62b348b6ad553fbb95c1d50d3b824a4..31b7eb0b57ef5dd7ac9217bc441d25804dcaac75 100644
(file)
--- a/
common/cmd_usb_mass_storage.c
+++ b/
common/cmd_usb_mass_storage.c
@@
-40,7
+40,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;