Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/hub/virthub.c

    r33b8d024 r58563585  
    4242#include <stdio.h>
    4343#include <stdlib.h>
    44 #include <str.h>
    4544#include <ddf/driver.h>
    4645
     
    148147 * @return Error code.
    149148 */
    150 errno_t virthub_init(usbvirt_device_t *dev, const char* name)
     149int virthub_init(usbvirt_device_t *dev, const char* name)
    151150{
    152151        if (dev == NULL) {
     
    156155        dev->descriptors = &descriptors;
    157156        dev->address = 0;
    158 
    159         char *n = str_dup(name);
    160         if (!n)
     157        dev->name = str_dup(name);
     158        if (!dev->name)
    161159                return ENOMEM;
    162160
    163161        hub_t *hub = malloc(sizeof(hub_t));
    164162        if (hub == NULL) {
    165                 free(n);
     163                free(dev->name);
    166164                return ENOMEM;
    167165        }
    168166
    169         dev->name = n;
    170167        hub_init(hub);
    171168        dev->device_data = hub;
     
    200197 * @return Error code.
    201198 */
    202 errno_t virthub_disconnect_device(usbvirt_device_t *dev, vhc_virtdev_t *conn)
     199int virthub_disconnect_device(usbvirt_device_t *dev, vhc_virtdev_t *conn)
    203200{
    204201        assert(dev != NULL);
Note: See TracChangeset for help on using the changeset viewer.