Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1439816iog; Thu, 16 Jun 2022 06:29:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t7I9WAK8xxvt4T9b0PlgikDJ1f+OvxtixrIDCgGcDRhpZ74YPMBth7Z4G1KlpnoX3Xr4rE X-Received: by 2002:a17:907:6e02:b0:719:2c77:37ce with SMTP id sd2-20020a1709076e0200b007192c7737cemr4037780ejc.759.1655386149985; Thu, 16 Jun 2022 06:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655386149; cv=none; d=google.com; s=arc-20160816; b=B7jfkQ5BV9svCmFzWhnFM0iz5kioKGzPUKnfxgznUD1yZU6OIvDq+OHMM9Y/8gi5La AYwArYbAwoHbTU6LUJMrI8FtvSHMojdomissk9H0LFtSbms2iQWpNtR1cxT6fTM7yHHZ GVLDK07LG0+U3XMHg7moehZgYK4U3VhcV0vHbx4AXV7idvyel+RB3kcMWRkFA1rgvRgj eZ/OMSVZAmb5SEzoTvltn0HiAzXNloF488/3xXL87LBDCpJusqaZz/fuzRCO5K61KYJ6 fQOAcMHFtmrF2NIdHrDlUR1PAQx3yXlqmL+bPOLbjVCkgq4paIh4422rwcHu8aLTbb6f qVgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nAdfxzBzareXu3Sxf+ensGGXOh9D8KhAATcseX8mJQI=; b=w/ldPXeuuKfDRYUXixgr4sAKPXAaLXppTSsgLOhI4Hp+3+7F62Gs8sIMBqq9JzVTpJ TT7bYrGyrsNLXWqj7s6+wEAnrDzNKIQITdJESjTD1FmPeQy4Jk2f+Ycg5saxmQ/TlHoN /DtTiY1CEo+s+h0C3YiyU/MPOlhu1cQVT4TYuHojxkj+eH12JBLruhhC1c4px75r+HPF ZP5kMALdAZNtHTCdL85lAv4gdy4EkpGNuxmD1AqRgMfvnZNyI98waLkJM3aWfaIilfLQ U30l6YmhOoJkV2qSUWORrPB4F+nPi8Z53Ki19RaOhweJmLDEUa8MHkSIv7ypoiB4+kgG /UhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz10-20020a1709077d8a00b006ff47214f59si2104073ejc.515.2022.06.16.06.28.41; Thu, 16 Jun 2022 06:29:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbiFPNWK (ORCPT + 99 others); Thu, 16 Jun 2022 09:22:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbiFPNWJ (ORCPT ); Thu, 16 Jun 2022 09:22:09 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F8EC43490; Thu, 16 Jun 2022 06:22:07 -0700 (PDT) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LP2pY36XlzhXZK; Thu, 16 Jun 2022 21:20:05 +0800 (CST) Received: from huawei.com (10.175.127.227) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 16 Jun 2022 21:22:04 +0800 From: Zheng Bin To: , , , , , , , , CC: , Subject: [PATCH -next] usb: gadget: aspeed_udc: fix missing spin_unlock_irqrestore in ast_udc_ep_queue Date: Thu, 16 Jun 2022 21:35:08 +0800 Message-ID: <20220616133508.3655864-1-zhengbin13@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ast_udc_ep_queue misses spin_unlock_irqrestore in an error path, this patch fixes that. Fixes: 055276c13205 ("usb: gadget: add Aspeed ast2600 udc driver") Signed-off-by: Zheng Bin --- drivers/usb/gadget/udc/aspeed_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c index 1fc15228ff15..6c91f7f288a2 100644 --- a/drivers/usb/gadget/udc/aspeed_udc.c +++ b/drivers/usb/gadget/udc/aspeed_udc.c @@ -665,7 +665,8 @@ static int ast_udc_ep_queue(struct usb_ep *_ep, struct usb_request *_req, if (ep->ep.desc == NULL) { if ((req->req.dma % 4) != 0) { dev_warn(dev, "EP0 req dma alignment error\n"); - return -ESHUTDOWN; + rc = -ESHUTDOWN; + goto end; } ast_udc_ep0_queue(ep, req); -- 2.31.1