Changeset b454a22 in mainline for uspace/lib/drv/generic/driver.c
- Timestamp:
- 2016-07-03T22:11:52Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 659ebd86
- Parents:
- 92c07dc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r92c07dc rb454a22 335 335 fibril_mutex_lock(&functions_mutex); 336 336 ddf_fun_t *fun = driver_get_function(handle); 337 if (fun != NULL) 338 fun_add_ref(fun); 337 339 fibril_mutex_unlock(&functions_mutex); 338 /* XXX Need a lock on fun */339 340 340 341 if (fun == NULL) { … … 348 349 /* Driver has a custom connection handler. */ 349 350 (*fun->conn_handler)(iid, icall, (void *)fun); 351 fun_del_ref(fun); 350 352 return; 351 353 } … … 362 364 363 365 async_answer_0(iid, ret); 364 if (ret != EOK) 366 if (ret != EOK) { 367 fun_del_ref(fun); 365 368 return; 369 } 366 370 367 371 while (true) { … … 376 380 (*fun->ops->close)(fun); 377 381 async_answer_0(callid, EOK); 382 fun_del_ref(fun); 378 383 return; 379 384 }
Note:
See TracChangeset
for help on using the changeset viewer.