mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 15:30:54 +07:00
NVMe: Free admin queue on request_irq error
Fixes a potential memory leak if requesting the admin queue irq fails. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
This commit is contained in:
parent
ec50373350
commit
025c557a71
@ -1054,14 +1054,19 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
|
||||
}
|
||||
}
|
||||
|
||||
if (result) {
|
||||
nvme_free_queue_mem(nvmeq);
|
||||
return result;
|
||||
}
|
||||
if (result)
|
||||
goto free_q;
|
||||
|
||||
result = queue_request_irq(dev, nvmeq, "nvme admin");
|
||||
if (result)
|
||||
goto free_q;
|
||||
|
||||
dev->queues[0] = nvmeq;
|
||||
return result;
|
||||
|
||||
free_q:
|
||||
nvme_free_queue_mem(nvmeq);
|
||||
return result;
|
||||
}
|
||||
|
||||
struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write,
|
||||
|
Loading…
Reference in New Issue
Block a user