提交 326700e3 编写于 作者: G Gerd Hoffmann

usb-uhci: cleanup UHCIAsync allocation & initialization.

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 81d37739
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册