|
@@ -2299,7 +2299,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
|
|
|
result = nvme_dev_map(dev);
|
|
|
if (result)
|
|
|
- goto free;
|
|
|
+ goto put_pci;
|
|
|
|
|
|
INIT_WORK(&dev->ctrl.reset_work, nvme_reset_work);
|
|
|
INIT_WORK(&dev->remove_work, nvme_remove_dead_ctrl_work);
|
|
@@ -2308,7 +2308,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
|
|
|
result = nvme_setup_prp_pools(dev);
|
|
|
if (result)
|
|
|
- goto put_pci;
|
|
|
+ goto unmap;
|
|
|
|
|
|
quirks |= check_dell_samsung_bug(pdev);
|
|
|
|
|
@@ -2325,9 +2325,10 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
|
|
|
release_pools:
|
|
|
nvme_release_prp_pools(dev);
|
|
|
+ unmap:
|
|
|
+ nvme_dev_unmap(dev);
|
|
|
put_pci:
|
|
|
put_device(dev->dev);
|
|
|
- nvme_dev_unmap(dev);
|
|
|
free:
|
|
|
kfree(dev->queues);
|
|
|
kfree(dev);
|