aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-11-08 11:00:38 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-11-10 12:29:50 +0000
commit542379f42642179cea33571c2799ca6fd03bf452 (patch)
treeb0a9167620ca097d8da63f7bc139119b7a82254a /hw/qdev.c
parent235e510cfddf2a5585f5f7ad5bcf65b6a4d7f221 (diff)
downloadqemu-542379f42642179cea33571c2799ca6fd03bf452.zip
qemu-542379f42642179cea33571c2799ca6fd03bf452.tar.gz
qemu-542379f42642179cea33571c2799ca6fd03bf452.tar.bz2
qdev: Fix crash on -device '?=x'
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 50976dd..106407f 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -186,7 +186,7 @@ int qdev_device_help(QemuOpts *opts)
return 1;
}
- if (!qemu_opt_get(opts, "?")) {
+ if (!driver || !qemu_opt_get(opts, "?")) {
return 0;
}