Changeset de16f89 in mainline for uspace/drv/audio/hdaudio/hdaudio.c
- Timestamp:
- 2014-09-05T08:52:51Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 089901e
- Parents:
- 3fec817
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/hdaudio.c
r3fec817 rde16f89 150 150 static int hda_dev_add(ddf_dev_t *dev) 151 151 { 152 ddf_fun_t *fun_pcm ;152 ddf_fun_t *fun_pcm = NULL; 153 153 hda_t *hda = NULL; 154 154 hw_res_list_parsed_t res; 155 155 irq_code_t irq_code; 156 irq_cmd_t *cmds ;156 irq_cmd_t *cmds = NULL; 157 157 size_t ncmds_base; 158 158 size_t ncmds_sdesc; 159 159 size_t ncmds; 160 160 int i; 161 void *regs ;161 void *regs = NULL; 162 162 int rc; 163 163 164 164 ddf_msg(LVL_NOTE, "hda_dev_add()"); 165 hw_res_list_parsed_init(&res); 165 166 166 167 hda = ddf_dev_data_alloc(dev, sizeof(hda_t)); … … 181 182 182 183 ddf_msg(LVL_NOTE, "get HW res list"); 183 hw_res_list_parsed_init(&res);184 184 rc = hw_res_get_list_parsed(hda->parent_sess, &res, 0); 185 185 if (rc != EOK) { … … 270 270 } 271 271 272 free(cmds); 273 cmds = NULL; 274 272 275 if (hda_ctl_init(hda) == NULL) { 273 276 rc = EIO; … … 295 298 296 299 ddf_fun_add_to_category(fun_pcm, "audio-pcm"); 300 301 hw_res_list_parsed_clean(&res); 297 302 return EOK; 298 303 error: 304 if (fun_pcm != NULL) 305 ddf_fun_destroy(fun_pcm); 299 306 if (hda != NULL) { 300 307 if (hda->ctl != NULL) 301 308 hda_ctl_fini(hda->ctl); 302 309 } 310 free(cmds); 311 // pio_disable(regs); 312 hw_res_list_parsed_clean(&res); 303 313 304 314 ddf_msg(LVL_NOTE, "Failing hda_dev_add() -> %d", rc); … … 323 333 } 324 334 335 hda_ctl_fini(hda->ctl); 336 // pio_disable(regs); 325 337 return EOK; 326 338 }
Note:
See TracChangeset
for help on using the changeset viewer.