| Submitter | Michael Roth |
|---|---|
| Date | Dec. 3, 2012, 10:44 p.m. |
| Message ID | <1354574681-28954-9-git-send-email-mdroth@linux.vnet.ibm.com> |
| Download | mbox | patch |
| Permalink | /patch/203478/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index b649360..1f73a52 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -585,6 +585,13 @@ USBDevice *usbdevice_create(const char *cmdline) return NULL; } + if (!bus) { + error_report("Error: no usb bus to attach usbdevice %s, " + "please try -machine usb=on and check that " + "the machine model supports USB", driver); + return NULL; + } + if (!f->usbdevice_init) { if (*params) { error_report("usbdevice %s accepts no params", driver);