Changeset eadaeae8 in mainline for uspace/drv/char/msim-con/msim-con.c
- Timestamp:
- 2018-03-21T20:58:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3be9d10
- Parents:
- 874381a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/msim-con/msim-con.c
r874381a readaeae8 83 83 { 84 84 ddf_fun_t *fun = NULL; 85 bool subscribed = false;86 85 irq_cmd_t *msim_cmds = NULL; 87 86 errno_t rc; … … 90 89 fibril_mutex_initialize(&con->buf_lock); 91 90 fibril_condvar_initialize(&con->buf_cv); 91 92 con->irq_handle = CAP_NIL; 92 93 93 94 msim_cmds = malloc(sizeof(msim_cmds_proto)); … … 125 126 con->irq_code.cmds = msim_cmds; 126 127 127 async_irq_subscribe(res->irq, msim_irq_handler, con, &con->irq_code, NULL); 128 subscribed = true; 128 rc = async_irq_subscribe(res->irq, msim_irq_handler, con, 129 &con->irq_code, &con->irq_handle); 130 if (rc != EOK) { 131 ddf_msg(LVL_ERROR, "Error registering IRQ code."); 132 goto error; 133 } 129 134 130 135 chardev_srvs_init(&con->cds); … … 142 147 return EOK; 143 148 error: 144 if ( subscribed)145 async_irq_unsubscribe( res->irq);149 if (CAP_HANDLE_VALID(con->irq_handle)) 150 async_irq_unsubscribe(con->irq_handle); 146 151 if (fun != NULL) 147 152 ddf_fun_destroy(fun);
Note:
See TracChangeset
for help on using the changeset viewer.