aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2010-06-02 17:19:56 -0300
committerDoug Goldstein <cardoe@gentoo.org>2010-07-20 17:31:43 -0500
commit16a5ebb4c5ee7da90a39ccb086f4ff2519e50298 (patch)
tree3d49d0b2cccd14bc0ada222cff4ffc34e331db63 /hw
parentAvoid crash on '-usbdevice <device>' without parameters (diff)
downloadqemu-kvm-16a5ebb4c5ee7da90a39ccb086f4ff2519e50298.tar.gz
qemu-kvm-16a5ebb4c5ee7da90a39ccb086f4ff2519e50298.tar.bz2
qemu-kvm-16a5ebb4c5ee7da90a39ccb086f4ff2519e50298.zip
usb-bus: fix no params
After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params is nerver NULL. It should check *params instead of params to determine whether the params is empty. Signed-off-by: TeLeMan <geleman@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> (cherry picked from commit 98f22dc172e1ebd5341da3de0d67666442566f72)
Diffstat (limited to 'hw')
-rw-r--r--hw/usb-bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 3bb89862b..aae1fef7f 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -299,7 +299,7 @@ USBDevice *usbdevice_create(const char *cmdline)
}
if (!usb->usbdevice_init) {
- if (params) {
+ if (*params) {
qemu_error("usbdevice %s accepts no params\n", driver);
return NULL;
}