[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211029200319.23475-4-jim2101024@gmail.com>
Date: Fri, 29 Oct 2021 16:03:11 -0400
From: Jim Quinlan <jim2101024@...il.com>
To: linux-pci@...r.kernel.org,
Nicolas Saenz Julienne <nsaenz@...nel.org>,
Rob Herring <robh@...nel.org>, Mark Brown <broonie@...nel.org>,
bcm-kernel-feedback-list@...adcom.com, jim2101024@...il.com,
james.quinlan@...adcom.com
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v6 3/9] PCI: move pci_device_add() call
Move call to pci_device_add() from pci_scan_single_device() to
pci_scan_device(). No other functions call pci_scan_device() so
this should be harmless.
Signed-off-by: Jim Quinlan <jim2101024@...il.com>
---
drivers/pci/probe.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index d9fc02a71baa..f3fc807b4fe8 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2391,6 +2391,7 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn)
kfree(dev);
return NULL;
}
+ pci_device_add(dev, bus);
return dev;
}
@@ -2540,13 +2541,7 @@ struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn)
return dev;
}
- dev = pci_scan_device(bus, devfn);
- if (!dev)
- return NULL;
-
- pci_device_add(dev, bus);
-
- return dev;
+ return pci_scan_device(bus, devfn);
}
EXPORT_SYMBOL(pci_scan_single_device);
--
2.17.1
Powered by blists - more mailing lists