Changeset ef9460b in mainline for uspace/drv/bus/usb/uhci/root_hub.c


Ignore:
Timestamp:
2011-07-14T21:55:18Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
333c233
Parents:
159100a
Message:

ddf_fun_add_match_id() should copy its string argument.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/root_hub.c

    r159100a ref9460b  
    5050int rh_init(rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size)
    5151{
     52        int ret;
     53
    5254        assert(fun);
    5355
    54         char *match_str = NULL;
    55         int ret = asprintf(&match_str, "usb&uhci&root-hub");
    56         if (ret < 0) {
    57                 usb_log_error("Failed to create root hub match string: %s.\n",
    58                     str_error(ret));
    59                 return ret;
    60         }
    61         assert(match_str);
    62 
    63         ret = ddf_fun_add_match_id(fun, match_str, 100);
     56        ret = ddf_fun_add_match_id(fun, "usb&uhci&root-hub", 100);
    6457        if (ret != EOK) {
    65                 free(match_str);
    6658                usb_log_error("Failed to add root hub match id: %s\n",
    6759                    str_error(ret));
Note: See TracChangeset for help on using the changeset viewer.