From patchwork Tue Aug 28 07:03:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 1379351 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id E1A7FDF283 for ; Tue, 28 Aug 2012 07:09:41 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T6Fs5-0002xz-LY; Tue, 28 Aug 2012 07:05:57 +0000 Received: from va3ehsobe006.messaging.microsoft.com ([216.32.180.16] helo=va3outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T6Fs1-0002xD-9N for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2012 07:05:53 +0000 Received: from mail179-va3-R.bigfish.com (10.7.14.240) by VA3EHSOBE008.bigfish.com (10.7.40.28) with Microsoft SMTP Server id 14.1.225.23; Tue, 28 Aug 2012 07:05:51 +0000 Received: from mail179-va3 (localhost [127.0.0.1]) by mail179-va3-R.bigfish.com (Postfix) with ESMTP id 8073F1800C1; Tue, 28 Aug 2012 07:05:51 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bhf0ah107ah) Received: from mail179-va3 (localhost.localdomain [127.0.0.1]) by mail179-va3 (MessageSwitch) id 1346137550135432_5214; Tue, 28 Aug 2012 07:05:50 +0000 (UTC) Received: from VA3EHSMHS036.bigfish.com (unknown [10.7.14.238]) by mail179-va3.bigfish.com (Postfix) with ESMTP id 19EE536005A; Tue, 28 Aug 2012 07:05:50 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS036.bigfish.com (10.7.99.46) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 28 Aug 2012 07:05:47 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.309.3; Tue, 28 Aug 2012 02:05:47 -0500 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q7S72ogI032560; Tue, 28 Aug 2012 00:05:42 -0700 From: Richard Zhao To: , Subject: [PATCH v2 04/11] USB: chipidea: clear gadget struct at udc_start fail path Date: Tue, 28 Aug 2012 15:03:10 +0800 Message-ID: <1346137397-32374-5-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346137397-32374-1-git-send-email-richard.zhao@freescale.com> References: <1346137397-32374-1-git-send-email-richard.zhao@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [216.32.180.16 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: marex@denx.de, B20596@freescale.com, dong.aisheng@linaro.org, fabio.estevam@freescale.com, alexander.shishkin@linux.intel.com, B29397@freescale.com, balbi@ti.com, stern@rowland.harvard.edu, kernel@pengutronix.de, gregkh@linuxfoundation.org, richard.zhao@freescale.com, shawn.guo@linaro.org, mkl@pengutronix.de, linuxzsc@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org States in gadget are not needed any more, set it to zero. Signed-off-by: Richard Zhao --- drivers/usb/chipidea/udc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index c7a032a..9fb6394 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1746,6 +1746,7 @@ free_pools: dma_pool_destroy(ci->td_pool); free_qh_pool: dma_pool_destroy(ci->qh_pool); + memset(&ci->gadget, 0, sizeof(ci->gadget)); return retval; }