Changeset 4f87a85a in mainline for uspace/drv/char/ns8250


Ignore:
Timestamp:
2018-12-10T14:29:35Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ca4c5596
Parents:
433d52f
git-author:
Jiri Svoboda <jiri@…> (2018-12-10 07:39:07)
git-committer:
Jiri Svoboda <jiri@…> (2018-12-10 14:29:35)
Message:

Check return code from ddf_add_fun_to_category

File:
1 edited

Legend:

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

    r433d52f 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.