From patchwork Tue Apr 24 15:51:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 154707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 50BF3B6F13 for ; Wed, 25 Apr 2012 02:10:06 +1000 (EST) Received: from localhost ([::1]:50904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMi2R-000564-1I for incoming@patchwork.ozlabs.org; Tue, 24 Apr 2012 11:52:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMi1j-0003Kk-Sf for qemu-devel@nongnu.org; Tue, 24 Apr 2012 11:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMi1e-0002KU-Kl for qemu-devel@nongnu.org; Tue, 24 Apr 2012 11:51:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMi1e-0002Jz-Bu for qemu-devel@nongnu.org; Tue, 24 Apr 2012 11:51:34 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3OFpWal032619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 24 Apr 2012 11:51:33 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3OFpWtV003580; Tue, 24 Apr 2012 11:51:32 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 9B4A441E36; Tue, 24 Apr 2012 17:51:31 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 24 Apr 2012 17:51:19 +0200 Message-Id: <1335282691-26864-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1335282691-26864-1-git-send-email-kraxel@redhat.com> References: <1335282691-26864-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 02/14] usb-ehci: add missing usb_packet_init() call X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/usb/core.c | 1 + hw/usb/hcd-ehci.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/usb/core.c b/hw/usb/core.c index 9a14a53..0e02da7 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -501,6 +501,7 @@ void usb_packet_set_state(USBPacket *p, USBPacketState state) void usb_packet_setup(USBPacket *p, int pid, USBEndpoint *ep) { assert(!usb_packet_is_inflight(p)); + assert(p->iov.iov != NULL); p->pid = pid; p->ep = ep; p->result = 0; diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 10a5b15..c6f21ac 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -664,6 +664,7 @@ static EHCIQueue *ehci_alloc_queue(EHCIState *ehci, int async) q = g_malloc0(sizeof(*q)); q->ehci = ehci; + usb_packet_init(&q->packet); QTAILQ_INSERT_HEAD(head, q, next); trace_usb_ehci_queue_action(q, "alloc"); return q;