Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4583665rwd; Sun, 4 Jun 2023 08:15:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Z9CJ8IRP0Z7778ew/4VY5FzhYejPMv6I2Yxz+3mpFIItjpquFS/uwJgPCYqppAtLnVrW1 X-Received: by 2002:a05:6a20:160a:b0:10c:322:72d5 with SMTP id l10-20020a056a20160a00b0010c032272d5mr4308007pzj.23.1685891756380; Sun, 04 Jun 2023 08:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685891756; cv=none; d=google.com; s=arc-20160816; b=dE2cf5Tz8ryZjF/UHvSM1ABMQmkGrO/QU+jAtVL6yRTeShCWpWY449aveLC6n08/HU cqyqGFiLqW71Obg7RRB3X4C30SaxEVk9+wlij082twlEqrRsaYMQtsqHD+lj1Jyjw17d S1zYw4sc+/pgAWJoTDaCudY+3rNHUbf64jK7PiuPg9/G4SfDNmESZ9hiWDZY9l7xofd8 aBJ66VCIregufoBoJkK7uXWoU9UtLLuRqvJJ3wr6jIiJuBDrYNjLuG79W5jNj8VVpC4y 3ayYHFZH/iq9q/WOiNwuovDQnW8CvfqXjbEfT4RCbpkuF6H17jWaBjog2VRbSLUJ/GFc b0mQ== 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:dkim-signature; bh=yUaA6iuQ+wEq2pR0TTwubVvItnjACHFQxAMGLNFZLXc=; b=OPy8fULsZXbBJp7ZGjMX6SN2G6Za5cAmV1X6Ku0GTZUx6glCTBlNMAQ+ILh2fSQbw5 3kBjkId+NV+aFlqJf1JZV4tsHBRbzVfb4KmrB2QDPJhm5zdxAZp+PQzch1PjCSif7Ost 0PDsf/aFJPn1B4eDMkoXj3wXq23IEYC41KbkyR1kyIH4HILRrSj5PqYI9CU+sGDOmIZM T0buKQpFLjPRvDh6wgWyq0AYOz9X9W2AC6+8SqjVyDKWKZjfQgs9bSS3NfyQosMG0pzG UYD+jdWFFHEcIgbCg/E2DQkSz0Cf0UG5QGKNRcX7SFKDM9U1cnDMazyKCbEAa5kxs//y BbeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=mMHiVsx0; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020aa79482000000b0064378fd1d54si3893836pfk.258.2023.06.04.08.15.42; Sun, 04 Jun 2023 08:15:56 -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; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=mMHiVsx0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231981AbjFDO4n (ORCPT + 99 others); Sun, 4 Jun 2023 10:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231909AbjFDO4m (ORCPT ); Sun, 4 Jun 2023 10:56:42 -0400 Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2B77CD for ; Sun, 4 Jun 2023 07:56:39 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 5p9nqXazR0h9k5p9nqRBSI; Sun, 04 Jun 2023 16:56:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1685890597; bh=yUaA6iuQ+wEq2pR0TTwubVvItnjACHFQxAMGLNFZLXc=; h=From:To:Cc:Subject:Date; b=mMHiVsx0L/Wo7j7u0lVmTjpJqxcW22V7qqbr7+xp8MfIeWnrIvcT+whm9RpjuDHJG HdG8VPA7o/RzclfA+4MTBo1zyfWoBcwfB9fkfBoXAHjLmuXokxVRfY0S88LOifaOPO WHkw9VboJnGcypPIkYCKAeSjHi0VRhlotQrF2fdvuilcA826dmrATM8e/wNGdCKlJ8 tY3eZaHiO/DTE+EN4LYMzr3sJjf1kfBk6A/xqdlLBYqng8TRgK+bLxu8CDDL6JVS4O g1qpHslIg5fF6YLg9MTAvdwJt68q4i7PKxKOcVoCLFOFSkCrWLE5K9hfI+dzOkJoMb D6k3cxiftJysw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 04 Jun 2023 16:56:37 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Thinh Nguyen , Greg Kroah-Hartman , Shawn Guo Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH] usb: dwc3: qcom: Fix an error handling path in dwc3_qcom_probe() Date: Sun, 4 Jun 2023 16:56:34 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 If dwc3_qcom_create_urs_usb_platdev() fails, some resources still need to be released, as already done in the other error handling path of the probe. Fixes: c25c210f590e ("usb: dwc3: qcom: add URS Host support for sdm845 ACPI boot") Signed-off-by: Christophe JAILLET --- drivers/usb/dwc3/dwc3-qcom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 822735814050..aa96c473f839 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -856,9 +856,10 @@ static int dwc3_qcom_probe(struct platform_device *pdev) if (IS_ERR_OR_NULL(qcom->urs_usb)) { dev_err(dev, "failed to create URS USB platdev\n"); if (!qcom->urs_usb) - return -ENODEV; + ret = -ENODEV; else - return PTR_ERR(qcom->urs_usb); + ret = PTR_ERR(qcom->urs_usb); + goto clk_disable; } } } -- 2.34.1