]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
nvme: Call pci_disable_device on the error path.
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Wed, 28 Sep 2016 15:55:21 +0000 (08:55 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:03:38 +0000 (08:03 -0500)
BugLink: http://bugs.launchpad.net/bugs/1628520
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>
(cherry picked from linux-stable commit 81e9a969c441d43b1a82b7d27848c0c7e1a5d90d)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
drivers/nvme/host/pci.c

index 58b9e7ccdc5633e91fa0b4daff6a5f57458fc713..aef865255f7c2579f1242d62bf78fad69840b913 100644 (file)
@@ -1772,7 +1772,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
        return 0;
 
  disable:
-       pci_release_regions(pdev);
+       pci_disable_device(pdev);
 
        return result;
 }