Changeset 359d96f in mainline
- Timestamp:
- 2011-10-13T21:22:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 229629d
- Parents:
- 05a119b
- Location:
- uspace/drv/bus/usb/usbmid
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmid/explore.c
r05a119b r359d96f 174 174 rc = ddf_fun_bind(ctl_fun); 175 175 if (rc != EOK) { 176 ddf_fun_destroy(ctl_fun); 176 177 usb_log_error("Failed to bind control function: %s.\n", 177 178 str_error(rc)); -
uspace/drv/bus/usb/usbmid/usbmid.c
r05a119b r359d96f 106 106 (int) interface_descriptor->interface_number); 107 107 if (rc < 0) { 108 goto error_leave;108 return ENOMEM; 109 109 } 110 110 111 111 /* Create the device. */ 112 112 child = ddf_fun_create(parent->ddf_dev, fun_inner, child_name); 113 free(child_name); 113 114 if (child == NULL) { 114 rc = ENOMEM; 115 goto error_leave; 115 return ENOMEM; 116 116 } 117 117 … … 122 122 123 123 rc = usb_device_create_match_ids_from_interface(device_descriptor, 124 interface_descriptor, 125 &child->match_ids); 124 interface_descriptor, &child->match_ids); 126 125 if (rc != EOK) { 127 goto error_leave; 126 ddf_fun_destroy(child); 127 return rc; 128 128 } 129 129 130 130 rc = ddf_fun_bind(child); 131 131 if (rc != EOK) { 132 goto error_leave; 132 /* This takes care of match_id deallocation as well. */ 133 ddf_fun_destroy(child); 134 return rc; 133 135 } 134 136 135 137 return EOK; 136 137 error_leave:138 if (child != NULL) {139 child->name = NULL;140 /* This takes care of match_id deallocation as well. */141 ddf_fun_destroy(child);142 }143 if (child_name != NULL) {144 free(child_name);145 }146 147 return rc;148 138 } 149 139
Note:
See TracChangeset
for help on using the changeset viewer.