s390/pci: fix removal of nonexistent pci bus
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 12 Dec 2013 16:50:53 +0000 (17:50 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Dec 2013 13:37:54 +0000 (14:37 +0100)
If we remove a pci bus after receiving a hotplug notification we need
to check if the bus is actually present (creation of the pci bus
during an earlier notification may have been failed).

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci_event.c

index 228787a3630a6e609fa15755088ec466a7d79284..65ea105f68a196790b7be4c03b70a32d3c4e1a51 100644 (file)
@@ -112,6 +112,8 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf)
                clp_rescan_pci_devices();
                break;
        case 0x0308: /* Standby -> Reserved */
+               if (!zdev)
+                       break;
                pci_stop_root_bus(zdev->bus);
                pci_remove_root_bus(zdev->bus);
                break;