mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
nvme(4): Do not panic on admin queue construct error.
MFC after: 1 week
This commit is contained in:
parent
d39e65b5bd
commit
31111372e6
1 changed files with 3 additions and 0 deletions
|
|
@ -1474,6 +1474,8 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev)
|
|||
|
||||
if (ctrlr->resource == NULL)
|
||||
goto nores;
|
||||
if (!mtx_initialized(&ctrlr->adminq.lock))
|
||||
goto noadminq;
|
||||
|
||||
/*
|
||||
* Check whether it is a hot unplug or a clean driver detach.
|
||||
|
|
@ -1519,6 +1521,7 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev)
|
|||
if (!gone)
|
||||
nvme_ctrlr_disable(ctrlr);
|
||||
|
||||
noadminq:
|
||||
if (ctrlr->taskqueue)
|
||||
taskqueue_free(ctrlr->taskqueue);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue