Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2878845rwb; Mon, 15 Aug 2022 13:09:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR5hBfzH84zgWdWeuoQd7UQS5FOi7cbSjSTK5f4WlcVfa/fQ3zivJljv0sMwMDl0ysjNGMNv X-Received: by 2002:aa7:d053:0:b0:43d:b75:fd96 with SMTP id n19-20020aa7d053000000b0043d0b75fd96mr15952722edo.12.1660594196263; Mon, 15 Aug 2022 13:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594196; cv=none; d=google.com; s=arc-20160816; b=XC+xaFJgpYKIKUYDzOpYzy+FXaOP2XF/fUZeBy7m0cNvszzIPki4npgGcHbMjAc7wK u9eMuEgkAUr3DslJklQ3XguOeTQrASH4jwXLOtRaVs8Tu7w+009PH+n+d/sRCmYq4csm 1wq1Cqa+8EdFTLagDM0Y7cpxpcsGBtuR4OImVBnk+xgVrlFhvZ1PElictMhm0CrMbgXY OkY4o7fknfQUFvRr5l2Gewkv03SBFncyXWoXQO5z9YV7wdU9INc068n+TShXDUlDfHf7 GRs2adOBEvwa1RTjAi9x/8iGKz/0eHY8LwPHYaxT36UA/cShymdlITbyZDrHDzrzXn+r N1xg== 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=tyo+qmuRjtzMIGXyZcavhJs2HvLii0e7SUcV4gu5HWc=; b=OqE4UBOsFkQo+YNlc/opSh6o6y2Z37uUQKmsNYDKbLfyn8U1qa3ByY5hLQQQzps2ec 9mMv1BJz3usbiraMxyvsFNufkA6jFwkIwcvycBn5uMX74caUDkoOQkO1XABpUJdKZZ1K 01djO+pBFwyuTOJjB27TSm7/DoB92pVz5JFRckvXYI9HHvCXDYqg+ifa8dG4gCXHy4kV /12Eowo86rhZretjwgIZ7RGYJe9IPRpOO5jF2Si2WKOaFbxhDeImE2Bx16OvvMimf6yh YxzcbTJn4rVqLJPHUmRt2+4eGKDUgqVNCmbTfRC1v7PlB47+r3tUGtcTsZe2KEPO6FMH 7Yew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U5V+hnc4; 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 t16-20020a056402241000b004436bac7e37si5061451eda.596.2022.08.15.13.09.29; Mon, 15 Aug 2022 13:09: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=@linuxfoundation.org header.s=korg header.b=U5V+hnc4; 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 S245696AbiHOTIC (ORCPT + 99 others); Mon, 15 Aug 2022 15:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245199AbiHOTDq (ORCPT ); Mon, 15 Aug 2022 15:03:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1B124D83B; Mon, 15 Aug 2022 11:34:08 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5945FB81081; Mon, 15 Aug 2022 18:34:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BF52C433D6; Mon, 15 Aug 2022 18:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588445; bh=aUBihyxrfQBqUNzsva5Gk6hgJt80ouxsOvTzdpdnTTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5V+hnc4C5YqxMtQ6IYALZfKp13QrVqPjB+J/ax80KdDNcZ3rTH/hqkKtTOw6XPIz m0iLE5ePSdFIQ/OdvntEEVJIDiZRdedHdRPacpMYGn0vp/qOaQNGEbLbOi6EAAoxDz uqVMRNi0MJviljmU4paeUXMNCeP3c4NFuozEhWpQ= 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.15 406/779] PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep() Date: Mon, 15 Aug 2022 20:00:50 +0200 Message-Id: <20220815180354.641999133@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 904976913081..98da2578e4db 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -1951,6 +1951,7 @@ static int tegra_pcie_config_ep(struct tegra_pcie_dw *pcie, if (ret) { dev_err(dev, "Failed to initialize DWC Endpoint subsystem: %d\n", ret); + pm_runtime_disable(dev); return ret; } -- 2.35.1