diff options
Diffstat (limited to 'hw/usb-serial.c')
-rw-r--r-- | hw/usb-serial.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb-serial.c b/hw/usb-serial.c index c3f3401370..1410b11b2b 100644 --- a/hw/usb-serial.c +++ b/hw/usb-serial.c @@ -594,6 +594,9 @@ static USBDevice *usb_serial_init(const char *filename) return NULL; dev = usb_create(NULL /* FIXME */, "usb-serial"); + if (!dev) { + return NULL; + } qdev_prop_set_chr(&dev->qdev, "chardev", cdrv); if (vendorid) qdev_prop_set_uint16(&dev->qdev, "vendorid", vendorid); |