linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -v2 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found
@ 2013-04-15  6:58 Yijing Wang
  2013-04-15  6:58 ` [PATCH -v2 2/2] PCI/IA64: fix pci_dev->enable_cnt balance when doing pci hotplug Yijing Wang
  2013-04-15 15:27 ` [PATCH -v2 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found Bjorn Helgaas
  0 siblings, 2 replies; 6+ messages in thread
From: Yijing Wang @ 2013-04-15  6:58 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Tony Luck, Hanjun Guo, jiang.liu, Yijing Wang,
	Kenji Kaneshige, Shengzhou Liu

We should decrease dev->enable_cnt when no pcie port capability
found for balance.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 drivers/pci/pcie/portdrv_core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 31063ac..aef3fac 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -369,8 +369,8 @@ int pcie_port_device_register(struct pci_dev *dev)
 
 	/* Get and check PCI Express port services */
 	capabilities = get_port_device_capability(dev);
-	if (!capabilities)
-		return 0;
+	if (!capabilities)
+		goto error_disable;
 
 	pci_set_master(dev);
 	/*
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-16  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15  6:58 [PATCH -v2 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found Yijing Wang
2013-04-15  6:58 ` [PATCH -v2 2/2] PCI/IA64: fix pci_dev->enable_cnt balance when doing pci hotplug Yijing Wang
2013-04-15 15:27 ` [PATCH -v2 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found Bjorn Helgaas
2013-04-16  8:22   ` huang ying
2013-04-16  8:55     ` Yijing Wang
2013-04-16  8:51   ` Yijing Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).