From patchwork Sat May 8 01:53:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 12245501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84D74C433B4 for ; Sat, 8 May 2021 01:55:10 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DE5260C3E for ; Sat, 8 May 2021 01:55:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DE5260C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=7fW46rNvT9d8bUNgV4sPFHjaKYfkdtaWsHqz6lb9K78=; b=fcQ0TCSV+uC8FR1DvzdpibLPEj mWcy7eJ2h5qNDCypVp6iKuTnJFBT6NXmsA+oTh5oJ23i5LdFKWfKXBJwqvN8OafTk4Y8wxg8Ugojv jjmAJJW1y9NpMm3xFpMy9ZMZlaCs14d4uCXiJm6uCCl1VKYc/wejmHq24LbdoX8phYiKYZXRQ1Afu fSEKRI+ctcwT48e0Ad3LaU7XaBmZrlU3s7UFKep9eS2+JfdxJkVdpPHOkuubcuUqVpkUS1Lxz8jSE DelPiSPqarjjY+t2Eml+mNliwXLnht7q0Y+DGXzMVK4SxhwxsjavmL2wEga6YPg4tJBGx2UAntqs9 QsTqquhg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfCA2-008VMW-T7; Sat, 08 May 2021 01:53:43 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfC9x-008VM1-PG for linux-arm-kernel@desiato.infradead.org; Sat, 08 May 2021 01:53:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=xrg6AqEsEMDoKaaZXubphn/lewqq+9VFL2GGC1xfOOM=; b=WGJSIkfcZ4Eu+QOHTrHC6lC7+C ViioKCxfuO/96V67Fb7LbsjjD6LWCITQr3o9buiNlUxgczlbTJcjEhRyJaPhLVBOoTMeHOMy2DcGO 89+H/gq73kvMZJDyVOp8MgkPVdRjtDZva4OrWwP6a8tXHqT39z6RG3rR2emmDO179f9qVJ0zFo9d9 SmfSu+xY7mseX9VJrd/LpfMWmRQc8975zJybc4HvsZ7Tz9CnsDnm/wxerq3BcxKFGbjV/60yEnRHg 0WF8O1/LGBRx2J3/U4uMSySnXitVbSU471mZpL5mu34SFQIU+9AxbyyybEvd3HYDF8pXCgMyoNnAw 9uZ064ig==; Received: from szxga06-in.huawei.com ([45.249.212.32]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfC9v-007JIS-0c for linux-arm-kernel@lists.infradead.org; Sat, 08 May 2021 01:53:36 +0000 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FcVfD5njdzlbxN; Sat, 8 May 2021 09:51:16 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 09:53:19 +0800 From: Zhen Lei To: Felipe Balbi , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "Li Jun" , linux-usb , linux-arm-kernel , linux-kernel CC: Zhen Lei Subject: [PATCH 1/1] usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe() Date: Sat, 8 May 2021 09:53:10 +0800 Message-ID: <20210508015310.1627-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210507_185335_232490_35972C07 X-CRM114-Status: UNSURE ( 8.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-imx8mp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index b13cfab89d53..97810ca17a2c 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -167,6 +167,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) dwc3_np = of_get_child_by_name(node, "dwc3"); if (!dwc3_np) { + err = -ENODEV; dev_err(dev, "failed to find dwc3 core child\n"); goto disable_rpm; }