Skip to contentSkip to conversation

s390x fix for 2.7

PATCH New Cornelia Huck 1 participant 2 messages Aug 5, 2016

lore
Share & tools
lore
#0 lore raw

cover s390x fix for 2.7

One more s390x fix for a bug in the pci rework. Plan to send a pull req early next week.

Yi Min Zhao (1):
s390x/pci: fix null pointer bug

 hw/s390x/s390-pci-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.9.2
#1 lore raw

PATCH 1/1 s390x/pci: fix null pointer bug

From: Yi Min Zhao <[email protected]>

We should make sure that it's not NULL firstly.

---
 hw/s390x/s390-pci-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-pci-bus.c +1 -1
index 47ca853..9c1c04e 100644
@@ -712,7 +712,7 @@ static void s390_pcihost_hot_unplug(HotplugHandler *hotplug_dev,
         pci_dev = PCI_DEVICE(dev);
 
         for (i = 0 ; i < PCI_SLOT_MAX; i++) {
-            if (s->pbdev[i]->pdev == pci_dev) {
+            if (s->pbdev[i] && s->pbdev[i]->pdev == pci_dev) {
                 pbdev = s->pbdev[i];
                 break;
             }
Signature · 1 line
2.9.2