aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-uhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r--hw/usb-uhci.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 89b357ea7c..d42d394176 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -155,14 +155,13 @@ typedef struct UHCI_QH {
static UHCIAsync *uhci_async_alloc(UHCIState *s)
{
UHCIAsync *async = qemu_malloc(sizeof(UHCIAsync));
- if (async) {
- memset(&async->packet, 0, sizeof(async->packet));
- async->valid = 0;
- async->td = 0;
- async->token = 0;
- async->done = 0;
- async->next = NULL;
- }
+
+ memset(&async->packet, 0, sizeof(async->packet));
+ async->valid = 0;
+ async->td = 0;
+ async->token = 0;
+ async->done = 0;
+ async->next = NULL;
return async;
}