Changeset fb422312 in mainline for uspace/lib/usbdev/src/hub.c
- Timestamp:
- 2011-10-13T11:42:31Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eda7a4e0
- Parents:
- 612af1a0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/hub.c
r612af1a0 rfb422312 37 37 #include <usb/dev/request.h> 38 38 #include <usb/dev/recognise.h> 39 #include <usb/debug.h> 39 40 #include <usbhc_iface.h> 40 41 #include <errno.h> … … 220 221 usb_address_t dev_addr = usb_hc_request_address(&hc_conn, dev_speed); 221 222 if (dev_addr < 0) { 222 usb_hc_connection_close(&hc_conn);223 return EADDRNOTAVAIL;223 rc = EADDRNOTAVAIL; 224 goto close_connection; 224 225 } 225 226 … … 336 337 goto leave_release_free_address; 337 338 } 338 339 usb_hc_connection_close(&hc_conn); 339 340 340 341 341 /* … … 349 349 } 350 350 351 return EOK; 352 353 351 rc = EOK; 352 goto close_connection; 354 353 355 354 /* … … 363 362 usb_hc_unregister_device(&hc_conn, dev_addr); 364 363 365 usb_hc_connection_close(&hc_conn); 364 close_connection: 365 if (usb_hc_connection_close(&hc_conn) != EOK) 366 usb_log_warning("usb_hc_new_device_wrapper(): Failed to close " 367 "connection.\n"); 366 368 367 369 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.