Changeset 2b3dd78 in mainline for uspace/drv/bus/usb
- Timestamp:
- 2018-01-31T12:02:00Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5595841
- Parents:
- a0a9cc2 (diff), 14d789c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/vhc/hub/virthub.c
ra0a9cc2 r2b3dd78 42 42 #include <stdio.h> 43 43 #include <stdlib.h> 44 #include <str.h> 44 45 #include <ddf/driver.h> 45 46 … … 155 156 dev->descriptors = &descriptors; 156 157 dev->address = 0; 157 dev->name = str_dup(name); 158 if (!dev->name) 158 159 char *n = str_dup(name); 160 if (!n) 159 161 return ENOMEM; 160 162 161 163 hub_t *hub = malloc(sizeof(hub_t)); 162 164 if (hub == NULL) { 163 free( dev->name);165 free(n); 164 166 return ENOMEM; 165 167 } 166 168 169 dev->name = n; 167 170 hub_init(hub); 168 171 dev->device_data = hub;
Note:
See TracChangeset
for help on using the changeset viewer.