Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/ns8250/ns8250.c

    r09ab0a9a r4f87a85a  
    829829        bool need_cleanup = false;
    830830        bool need_unreg_intr_handler = false;
     831        bool bound = false;
    831832        errno_t rc;
    832833
     
    909910        }
    910911
     912        bound = true;
    911913        ns->fun = fun;
    912914
    913         ddf_fun_add_to_category(fun, "serial");
     915        rc = ddf_fun_add_to_category(fun, "serial");
     916        if (rc != EOK) {
     917                ddf_msg(LVL_ERROR, "Error adding function to category 'serial'.");
     918                goto fail;
     919        }
    914920
    915921        ddf_msg(LVL_NOTE, "Device %s successfully initialized.",
     
    918924        return EOK;
    919925fail:
     926        if (bound)
     927                ddf_fun_unbind(fun);
    920928        if (fun != NULL)
    921929                ddf_fun_destroy(fun);
Note: See TracChangeset for help on using the changeset viewer.