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>
master
Markus Armbruster 2011-11-08 11:00:38 +01:00 committed by Stefan Hajnoczi
parent 235e510cfd
commit 542379f426
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}