summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>2016-09-08 18:10:23 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-15 08:27:51 +0200
commit81e9a969c441d43b1a82b7d27848c0c7e1a5d90d (patch)
tree3f21c0a3de72f99fc4742d4ecb869c01e3a6eda9
parentdb8c7fff99ef64e0f2702b5477104b6c3a6c6fee (diff)
downloadlinux-stable-81e9a969c441d43b1a82b7d27848c0c7e1a5d90d.tar.gz
linux-stable-81e9a969c441d43b1a82b7d27848c0c7e1a5d90d.tar.bz2
linux-stable-81e9a969c441d43b1a82b7d27848c0c7e1a5d90d.zip
nvme: Call pci_disable_device on the error path.
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>
-rw-r--r--drivers/nvme/host/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 289a5df0d44a..c851bc53831c 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -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;
}