Ignore:
Timestamp:
2018-12-10T14:29:35Z (5 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/sun4v-con/sun4v-con.c

    r433d52f r4f87a85a  
    7474        ddf_fun_t *fun = NULL;
    7575        errno_t rc;
     76        bool bound = false;
    7677
    7778        con->res = *res;
     
    113114        }
    114115
    115         ddf_fun_add_to_category(fun, "console");
     116        bound = true;
     117
     118        rc = ddf_fun_add_to_category(fun, "console");
     119        if (rc != EOK) {
     120                ddf_msg(LVL_ERROR, "Error adding function 'a' to category "
     121                    "'console'.");
     122                goto error;
     123        }
    116124
    117125        return EOK;
     
    122130        if (con->output_buffer != (niagara_output_buffer_t *) AS_AREA_ANY)
    123131                physmem_unmap((void *) con->output_buffer);
     132
     133        if (bound)
     134                ddf_fun_unbind(fun);
    124135
    125136        if (fun != NULL)
Note: See TracChangeset for help on using the changeset viewer.