Changeset bcf54ac in mainline


Ignore:
Timestamp:
2011-11-07T12:03:13Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0c05e7
Parents:
2155955
Message:

usbhid, keyboard: Do not destroy functions that fail to unbind.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.c

    r2155955 rbcf54ac  
    531531                    "Could not add DDF function to category %s: %s.\n",
    532532                    HID_KBD_CLASS_NAME, str_error(rc));
    533                 ddf_fun_unbind(fun);
    534                 fun->driver_data = NULL; /* We need this later */
    535                 ddf_fun_destroy(fun);
     533                if (ddf_fun_unbind(fun) == EOK) {
     534                        fun->driver_data = NULL; /* We need this later */
     535                        ddf_fun_destroy(fun);
     536                } else {
     537                        usb_log_error(
     538                            "Failed to unbind `%s', will not destroy.\n",
     539                            fun->name);
     540                }
    536541                return rc;
    537542        }
Note: See TracChangeset for help on using the changeset viewer.