Changeset 065064e6 in mainline for uspace/drv/bus/usb/usbmid/explore.c
- Timestamp:
- 2011-10-15T12:49:18Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3f7418
- Parents:
- 7c95d6f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmid/explore.c
r7c95d6f5 r065064e6 163 163 } 164 164 165 usb_mid_t *usb_mid = malloc(sizeof(usb_mid_t));165 usb_mid_t *usb_mid = usb_device_data_alloc(dev, sizeof(usb_mid_t)); 166 166 if (!usb_mid) { 167 167 usb_log_error("Failed to create USB MID structure.\n"); … … 173 173 if (usb_mid->ctl_fun == NULL) { 174 174 usb_log_error("Failed to create control function.\n"); 175 free(usb_mid);176 175 return false; 177 176 } … … 184 183 str_error(rc)); 185 184 ddf_fun_destroy(usb_mid->ctl_fun); 186 free(usb_mid);187 185 return false; 188 186 } … … 209 207 } 210 208 } 211 dev->driver_data = usb_mid;212 209 213 210 return true;
Note:
See TracChangeset
for help on using the changeset viewer.