Fix config_intrhook leak on initial reset failure.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
This commit is contained in:
Alexander Motin 2020-06-12 14:14:01 +00:00
parent a132ec9f8a
commit 92390644e3

View File

@ -1126,12 +1126,14 @@ nvme_ctrlr_start_config_hook(void *arg)
status = nvme_ctrlr_hw_reset(ctrlr);
if (status != 0) {
nvme_ctrlr_fail(ctrlr);
config_intrhook_disestablish(&ctrlr->config_hook);
return;
}
status = nvme_ctrlr_hw_reset(ctrlr);
if (status != 0) {
nvme_ctrlr_fail(ctrlr);
config_intrhook_disestablish(&ctrlr->config_hook);
return;
}