Changeset 4f87a85a in mainline for uspace/drv/audio/hdaudio/hdaudio.c


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/audio/hdaudio/hdaudio.c

    r433d52f r4f87a85a  
    151151{
    152152        ddf_fun_t *fun_pcm = NULL;
     153        bool bound = false;
    153154        hda_t *hda = NULL;
    154155        hw_res_list_parsed_t res;
     
    299300        }
    300301
    301         ddf_fun_add_to_category(fun_pcm, "audio-pcm");
     302        bound = true;
     303
     304        rc = ddf_fun_add_to_category(fun_pcm, "audio-pcm");
     305        if (rc != EOK) {
     306                ddf_msg(LVL_ERROR, "Failed adding function to audio-pcm category.");
     307                goto error;
     308        }
    302309
    303310        hw_res_list_parsed_clean(&res);
    304311        return EOK;
    305312error:
     313        if (bound)
     314                ddf_fun_unbind(fun_pcm);
    306315        if (fun_pcm != NULL)
    307316                ddf_fun_destroy(fun_pcm);
Note: See TracChangeset for help on using the changeset viewer.