diff mbox series

[v2,3/4] s390/pci: remove redundant pci_bus_add_devices() on new bus

Message ID 20230306151014.60913-4-schnelle@linux.ibm.com
State New
Headers show
Series PCI: s390: Fix user-after-free and clean up | expand

Commit Message

Niklas Schnelle March 6, 2023, 3:10 p.m. UTC
The pci_bus_add_devices() call in zpci_bus_create_pci_bus() is without
function since at this point no device could have been added to the
freshly created PCI bus.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
 arch/s390/pci/pci_bus.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Matthew Rosato March 9, 2023, 7:14 p.m. UTC | #1
On 3/6/23 10:10 AM, Niklas Schnelle wrote:
> The pci_bus_add_devices() call in zpci_bus_create_pci_bus() is without
> function since at this point no device could have been added to the
> freshly created PCI bus.
> 
> Suggested-by: Bjorn Helgaas <helgaas@kernel.org>> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
diff mbox series

Patch

diff --git a/arch/s390/pci/pci_bus.c b/arch/s390/pci/pci_bus.c
index ae46c280b35f..f8778cd2c029 100644
--- a/arch/s390/pci/pci_bus.c
+++ b/arch/s390/pci/pci_bus.c
@@ -210,7 +210,6 @@  static int zpci_bus_create_pci_bus(struct zpci_bus *zbus, struct zpci_dev *fr, s
 	}
 
 	zbus->bus = bus;
-	pci_bus_add_devices(bus);
 
 	return 0;
 }