]> git.proxmox.com Git - mirror_qemu.git/commitdiff
usb-uhci: cleanup UHCIAsync allocation & initialization.
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 27 Jan 2012 13:17:59 +0000 (14:17 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 27 Feb 2012 10:13:26 +0000 (11:13 +0100)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-uhci.c

index 2280dc792ddb1401b997cf3c8b5153a97bf0614f..ca87290bf15b46fa79af79b22222ed52f8248a84 100644 (file)
@@ -159,15 +159,9 @@ typedef struct UHCI_QH {
 
 static UHCIAsync *uhci_async_alloc(UHCIState *s)
 {
-    UHCIAsync *async = g_malloc(sizeof(UHCIAsync));
+    UHCIAsync *async = g_new0(UHCIAsync, 1);
 
-    memset(&async->packet, 0, sizeof(async->packet));
     async->uhci  = s;
-    async->valid = 0;
-    async->td    = 0;
-    async->token = 0;
-    async->done  = 0;
-    async->isoc  = 0;
     usb_packet_init(&async->packet);
     pci_dma_sglist_init(&async->sgl, &s->dev, 1);