OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5100917
)
s390x/pci: fix null pointer bug
author
Yi Min Zhao
<zyimin@linux.vnet.ibm.com>
Fri, 5 Aug 2016 09:00:35 +0000
(17:00 +0800)
committer
Cornelia Huck
<cornelia.huck@de.ibm.com>
Mon, 8 Aug 2016 10:47:02 +0000
(12:47 +0200)
We should make sure that it's not NULL firstly.
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/s390-pci-bus.c
patch
|
blob
|
history
diff --git
a/hw/s390x/s390-pci-bus.c
b/hw/s390x/s390-pci-bus.c
index
47ca853
..
9c1c04e
100644
(file)
--- a/
hw/s390x/s390-pci-bus.c
+++ b/
hw/s390x/s390-pci-bus.c
@@
-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;
}