Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3082967rwb; Mon, 15 Aug 2022 17:42:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR6LSZaQCyBfn44HXUJXpLX94tUlk8zTu/i88IIODiIH7MFOFDVUij68uapYW77t1MAh3GFN X-Received: by 2002:a05:6a00:2294:b0:52e:2371:8bb with SMTP id f20-20020a056a00229400b0052e237108bbmr18674540pfe.42.1660610558011; Mon, 15 Aug 2022 17:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610558; cv=none; d=google.com; s=arc-20160816; b=BU3v7tTZq+tJI4+WOEa87vvOVs94BPFAIO0z8SgStv45BH6KJ8PKpp3kx5PrA3zaoX N+TdICHRt3y2SU5puV0B3WcglaU3tifFYiNG9CljMIwhChW2QqzW/uY8t7Kkn9VlQNeo 3/e1uPksub8e587PoTqBCPLpBHlqO10jM8LgZCa0dRoEyL4WII5gymWnabxcbszVJa3m SIaeXk5wPVpnz/0wFX5alN5YMbmnIaCl/Bx8T/SUzAAc9rt/QXfGG6IFcnx/D9KtXYA2 3isOoxzYsRCvznPPj5568vK/dxVNTXhq9SJr5enVa9lAm5fZR3vct4JeNREQU1iOXFxr tk5w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QHq0ljxoHyobUF3cMNyR+wADUxEigwCn/fkRGFvNGi4=; b=ZDzNJWCV93EFEGG/mH82FYXdcQvfB8EfiMMPVh7v1MHrA3NGizjTKR3e6MIwojqE63 lpd6erldzgFc15oZqymfzCHUTilJ/lPtJjvbHV7vlyG8yMR5R+KVYL0JWOOKB9OfyfuJ KPHklBkQ9ShXI1ddNEBeKRe9Y/WSP/x7Z45GYAb90qB9WqqctnFR/Gv2NqoTIzEN6o8/ mQNHs8JYqY8KX5LzjxC52cxutpfUHGqx44rGifqvKa6k57Bzkh0GotpMUqZFU1a2fuzP IwR+sLIFmdAUbclzUI7JPdZdqUuWM7NA1/fip2A4b5rgDZ5h0yj4zHH5sE6+TFLkSPKt TWuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n3uPvfiW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 81-20020a630254000000b004224f632c9asi12512843pgc.328.2022.08.15.17.42.27; Mon, 15 Aug 2022 17:42:38 -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=@linuxfoundation.org header.s=korg header.b=n3uPvfiW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351259AbiHPAI0 (ORCPT + 99 others); Mon, 15 Aug 2022 20:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346731AbiHPAA0 (ORCPT ); Mon, 15 Aug 2022 20:00:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CA2396FDC; Mon, 15 Aug 2022 13:21:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BCAED61007; Mon, 15 Aug 2022 20:21:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF441C433C1; Mon, 15 Aug 2022 20:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594900; bh=JAMfREOs/4J2zJNaA1OfXY1zsRJpJRl3sXHTYuiV81Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n3uPvfiWHcUP7R08oxF0gEKKB9B4Cp7T3VURYqtYpVnLfmn2snygSZpOxBx83Bsqt AM7LN3vru3wnJggnP3otEI2VEZ/bTvjpusvCwSjf5zeVPmRhb164YVa93Xmhm6Q047 p9DvAxnH2f8aXte91pZTDBWmr1W5Gfku81Vn1Ps8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Bjorn Helgaas , Vidya Sagar , Sasha Levin Subject: [PATCH 5.19 0595/1157] PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep() Date: Mon, 15 Aug 2022 19:59:11 +0200 Message-Id: <20220815180503.455600296@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Miaoqian Lin [ Upstream commit e8fbd344a5ea62663554b8546b6bf9f88b93785a ] pm_runtime_enable() will increase power disable depth. If dw_pcie_ep_init() fails, we should use pm_runtime_disable() to balance it with pm_runtime_enable(). Add missing pm_runtime_disable() for tegra_pcie_config_ep(). Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Link: https://lore.kernel.org/r/20220602031910.55859-1-linmq006@gmail.com Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar Signed-off-by: Sasha Levin --- drivers/pci/controller/dwc/pcie-tegra194.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index cc2678490162..d992371a36e6 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -1949,6 +1949,7 @@ static int tegra_pcie_config_ep(struct tegra194_pcie *pcie, if (ret) { dev_err(dev, "Failed to initialize DWC Endpoint subsystem: %d\n", ret); + pm_runtime_disable(dev); return ret; } -- 2.35.1