Changeset c05642d in mainline for uspace/drv/bus/usb/usbmast/main.c
- Timestamp:
- 2011-09-07T00:03:26Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5081276
- Parents:
- bb74dabe (diff), 038b289 (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/usbmast/main.c
rbb74dabe rc05642d 145 145 usbmast_fun_t *mfun = NULL; 146 146 147 /* Allocate softstate */148 mfun = calloc(1, sizeof(usbmast_fun_t));149 if (mfun == NULL) {150 usb_log_error("Failed allocating softstate.\n");151 rc = ENOMEM;152 goto error;153 }154 155 mfun->mdev = mdev;156 mfun->lun = lun;157 158 147 if (asprintf(&fun_name, "l%u", lun) < 0) { 159 148 usb_log_error("Out of memory.\n"); … … 170 159 171 160 free(fun_name); 161 162 /* Allocate soft state */ 163 mfun = ddf_dev_data_alloc(mdev->ddf_dev, sizeof(usbmast_fun_t)); 164 if (mfun == NULL) { 165 usb_log_error("Failed allocating softstate.\n"); 166 rc = ENOMEM; 167 goto error; 168 } 169 170 mfun->mdev = mdev; 171 mfun->lun = lun; 172 172 173 fun_name = NULL; 173 174 … … 227 228 if (fun_name != NULL) 228 229 free(fun_name); 229 if (mfun != NULL)230 free(mfun);231 230 return rc; 232 231 }
Note:
See TracChangeset
for help on using the changeset viewer.