nvme: Call pci_disable_device on the error path.
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Thu, 8 Sep 2016 21:10:23 +0000 (18:10 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:51 +0000 (08:27 +0200)
Commit 5706aca74fe4 ("NVMe: Don't unmap controller registers on reset"),
which backported b00a726a9fd8 to the 4.4.y kernel introduced a
regression in which it didn't call pci_disable_device in the error path
of nvme_pci_enable.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Embarassed-developer: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/pci.c

index 289a5df0d44ad9225ee34bed0b5847ea5547fc3d..c851bc53831c1267c0cccab074e5cd141b1d5825 100644 (file)
@@ -2725,7 +2725,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
        return 0;
 
  disable:
-       pci_release_regions(pdev);
+       pci_disable_device(pdev);
 
        return result;
 }