Changeset fb422312 in mainline


Ignore:
Timestamp:
2011-10-13T11:42:31Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eda7a4e0
Parents:
612af1a0
Message:

libusbdev: Warn about not closing hc connections.

There is not much we can do.

Location:
uspace/lib/usbdev/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    r612af1a0 rfb422312  
    391391        }
    392392
    393         usb_hc_connection_close(&hc_conn);
     393        if (usb_hc_connection_close(&hc_conn) != EOK)
     394                usb_log_warning("usb_device_create_pipes(): "
     395                    "Failed to close connection.\n");
    394396
    395397        *pipes_ptr = pipes;
     
    413415        }
    414416
    415         usb_hc_connection_close(&hc_conn);
     417        if (usb_hc_connection_close(&hc_conn) != EOK)
     418                usb_log_warning("usb_device_create_pipes(): "
     419                    "Failed to close connection.\n");
    416420
    417421        /*
     
    468472        }
    469473
    470         usb_hc_connection_close(&hc_conn);
     474        if (usb_hc_connection_close(&hc_conn) != EOK)
     475                usb_log_warning("usb_device_destroy_pipes(): "
     476                    "Failed to close connection.\n");
    471477
    472478        free(pipes);
  • uspace/lib/usbdev/src/hub.c

    r612af1a0 rfb422312  
    3737#include <usb/dev/request.h>
    3838#include <usb/dev/recognise.h>
     39#include <usb/debug.h>
    3940#include <usbhc_iface.h>
    4041#include <errno.h>
     
    220221        usb_address_t dev_addr = usb_hc_request_address(&hc_conn, dev_speed);
    221222        if (dev_addr < 0) {
    222                 usb_hc_connection_close(&hc_conn);
    223                 return EADDRNOTAVAIL;
     223                rc = EADDRNOTAVAIL;
     224                goto close_connection;
    224225        }
    225226
     
    336337                goto leave_release_free_address;
    337338        }
    338        
    339         usb_hc_connection_close(&hc_conn);
     339
    340340
    341341        /*
     
    349349        }
    350350
    351         return EOK;
    352 
    353 
     351        rc = EOK;
     352        goto close_connection;
    354353
    355354        /*
     
    363362        usb_hc_unregister_device(&hc_conn, dev_addr);
    364363
    365         usb_hc_connection_close(&hc_conn);
     364close_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");
    366368
    367369        return rc;
Note: See TracChangeset for help on using the changeset viewer.