Changeset c05642d in mainline for uspace/drv/bus/usb/usbhid/multimedia/multimedia.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/usbhid/multimedia/multimedia.c
rbb74dabe rc05642d 167 167 /*----------------------------------------------------------------------------*/ 168 168 169 static void usb_multimedia_free(usb_multimedia_t **multim_dev)170 {171 if (multim_dev == NULL || *multim_dev == NULL) {172 return;173 }174 175 // hangup phone to the console176 async_obsolete_hangup((*multim_dev)->console_phone);177 178 free(*multim_dev);179 *multim_dev = NULL;180 }181 182 /*----------------------------------------------------------------------------*/183 184 169 static int usb_multimedia_create_function(usb_hid_dev_t *hid_dev, 185 170 usb_multimedia_t *multim_dev) … … 247 232 248 233 int rc = usb_multimedia_create_function(hid_dev, multim_dev); 249 if (rc != EOK) { 250 usb_multimedia_free(&multim_dev); 234 if (rc != EOK) 251 235 return rc; 252 }253 236 254 237 usb_log_debug(NAME " HID/multimedia structure initialized.\n"); … … 267 250 if (data != NULL) { 268 251 usb_multimedia_t *multim_dev = (usb_multimedia_t *)data; 269 usb_multimedia_free(&multim_dev); 252 // hangup phone to the console 253 async_obsolete_hangup(multim_dev->console_phone); 270 254 } 271 255 }
Note:
See TracChangeset
for help on using the changeset viewer.