summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-03-05 16:41:20 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-03-05 16:41:20 +0000
commitf2bb2d14c2958f3f5aef456bd2cdb1ff99f4a562 (patch)
tree32d6f5e654d05414f73892160d08ec8b81caff01 /tests
parent4ee02f53be79f21602ace1ff4057c45bbf86ca64 (diff)
parent23500c6a9409efc80d696aede0629bfbe7556a90 (diff)
downloadfocaccia-qemu-f2bb2d14c2958f3f5aef456bd2cdb1ff99f4a562.tar.gz
focaccia-qemu-f2bb2d14c2958f3f5aef456bd2cdb1ff99f4a562.zip
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request

Mostly patches that are only indirectly related to the block layer, but I've
reviewed them and there is no maintainer.

# gpg: Signature made Mon 05 Mar 2018 09:39:50 GMT
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  README: Document 'git-publish' workflow
  Add a git-publish configuration file
  tests/libqos: Check for valid dev pointer when looking for PCI devices
  util/uri.c: wrap single statement blocks with braces {}
  util/uri.c: remove brackets that wrap `return` statement's content.
  util/uri.c: Coding style check, Only whitespace involved

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/libqos/virtio-pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/libqos/virtio-pci.c b/tests/libqos/virtio-pci.c
index 7ac15c04e1..550dede0a2 100644
--- a/tests/libqos/virtio-pci.c
+++ b/tests/libqos/virtio-pci.c
@@ -315,7 +315,9 @@ QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type)
     qvirtio_pci_foreach(bus, device_type, false, 0,
                         qvirtio_pci_assign_device, &dev);
 
-    dev->vdev.bus = &qvirtio_pci;
+    if (dev) {
+        dev->vdev.bus = &qvirtio_pci;
+    }
 
     return dev;
 }