aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-net.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb-net.c')
-rw-r--r--hw/usb-net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb-net.c b/hw/usb-net.c
index cfd2f62e09..6875f112fe 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1491,6 +1491,9 @@ static USBDevice *usb_net_init(const char *cmdline)
}
dev = usb_create(NULL /* FIXME */, "usb-net");
+ if (!dev) {
+ return NULL;
+ }
qdev_set_nic_properties(&dev->qdev, &nd_table[idx]);
qdev_init_nofail(&dev->qdev);
return dev;