Changeset 878b764 in mainline
- Timestamp:
- 2012-11-21T22:46:50Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bebf97d
- Parents:
- 7a6d91b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c
r7a6d91b r878b764 116 116 }; 117 117 118 static boolrootamdm37x_add_fun(ddf_dev_t *dev, const char *name,118 static int rootamdm37x_add_fun(ddf_dev_t *dev, const char *name, 119 119 const char *str_match_id, const rootamdm37x_fun_t *fun) 120 120 { … … 128 128 129 129 /* Add match id */ 130 if (ddf_fun_add_match_id(fnode, str_match_id, 100) != EOK) { 130 int ret = ddf_fun_add_match_id(fnode, str_match_id, 100); 131 if (ret != EOK) { 131 132 ddf_fun_destroy(fnode); 132 return false;133 return ret; 133 134 } 134 135 … … 138 139 139 140 /* Register function. */ 140 if (ddf_fun_bind(fnode) != EOK) { 141 ret = ddf_fun_bind(fnode); 142 if (ret != EOK) { 141 143 ddf_msg(LVL_ERROR, "Failed binding function %s.", name); 142 144 // TODO This will try to free our data! 143 145 ddf_fun_destroy(fnode); 144 return false;145 } 146 147 return true;146 return ret; 147 } 148 149 return EOK; 148 150 } 149 151 … … 183 185 184 186 /* Register functions */ 185 if ( !rootamdm37x_add_fun(dev, "ohci", "usb/host=ohci", &ohci))187 if (rootamdm37x_add_fun(dev, "ohci", "usb/host=ohci", &ohci) != EOK) 186 188 ddf_msg(LVL_ERROR, "Failed to add OHCI function for " 187 189 "BeagleBoard-xM platform."); 188 if ( !rootamdm37x_add_fun(dev, "ehci", "usb/host=ehci", &ehci))190 if (rootamdm37x_add_fun(dev, "ehci", "usb/host=ehci", &ehci) != EOK) 189 191 ddf_msg(LVL_ERROR, "Failed to add EHCI function for " 190 192 "BeagleBoard-xM platform.");
Note:
See TracChangeset
for help on using the changeset viewer.