Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3023652rwb; Mon, 15 Aug 2022 16:21:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR5pp1k+2AzPzG5l8fQd2tkXlU2wLJODw/C6OPAFURKSUy4T1F8XCL83a8TSg/7XYdkRNR82 X-Received: by 2002:a05:6402:90a:b0:443:8b10:bcad with SMTP id g10-20020a056402090a00b004438b10bcadmr9634516edz.416.1660605674110; Mon, 15 Aug 2022 16:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605674; cv=none; d=google.com; s=arc-20160816; b=MIqMb3Xe3M9Q+q+ELXO5wvxZ0gUpPo4/RRtNq1W2hC5zlP/EXwyRXeSAUu5gd7KzM3 r4oHbvQL847zUqrHdm8ozND5UmFTJSdZlsLSKTgE8PK8nX+1spqGkKOXJPKd4VxZ/8eq 5pPENPolEU3Q09UZiNzoQI6JBW6h9HoDJB3wEZpyLJaAqgDs486K+VbHS+PiGdQkQB+V mrhLwwP1yE9OUR+5hPplTlzRFhnXAtI1ci8iqP0BPCAvAY7glf4//hGH+RxEjqei/2aA qv29oZrdeeJ19SoRLzuVESPeN2BTN8xj+k7jIZHdfgke0ekSaTrJmB07Q8HyBOZnIyy9 zLGw== 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=AUVTTuqZU5njlF1wmf853aBM808nc1ZzwOwfsgG2jek=; b=UbOmfKVqG/U0/i5HHX/6mD+XU/kP47ZoMZQEW0bl2rO/Zt2OX4o4W8R4ybwrf3hDdA cUQjM0fLOgyYO9arshNgUyXPC69+S9I1ZSimqCUp8t1drF0nUsgUF7HuxO6rX4ZOPOSS AUFhEOD40Fu0MoSmR+q1rnT6dbWf003IUQ9pN9PQwMBzBy3+bvto3R+sT/jhDhyjgaTl YjsChWY0s2Rw5jDqgHCPuKbxN33wHytIc2ZjOxBqKC8OYFEiOBj7RyzaN1R3n8xvc7Dh Wnucd9Ootj3wJ9pPfciqSY8zvngSB5iwjaKdxvuBY2zPvZkHVNYn+kWPaYBk9k9OAj7C wFXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WP+XBHPk; 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 n8-20020a05640205c800b0043ac721c313si10078707edx.550.2022.08.15.16.20.49; Mon, 15 Aug 2022 16:21:14 -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=WP+XBHPk; 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 S1348075AbiHOVaV (ORCPT + 99 others); Mon, 15 Aug 2022 17:30:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348227AbiHOV1E (ORCPT ); Mon, 15 Aug 2022 17:27:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A074E9A9F; Mon, 15 Aug 2022 12:23:03 -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 29D13B81062; Mon, 15 Aug 2022 19:23:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CCECC433B5; Mon, 15 Aug 2022 19:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591380; bh=m5pg8KO/7b40AWDkw1tfUtzdu1cCdSm98iHUIZ9koyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WP+XBHPkrcsQG0HL0xgoUO79XFg3KBE2G9E4ahB1jn83myXElKy0UCGgiJwQ4gZta spch18dcUP+AS7R4fPPjH3O7ttpurMp2o3DBNrSaAmLQXBbAzKyMKsswGBTxjxF9Ud QA6QQq76xkVATZ5lku89LDlIZV6uaGbi07Hftx4E= 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.18 0561/1095] PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep() Date: Mon, 15 Aug 2022 19:59:20 +0200 Message-Id: <20220815180452.779643101@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 b1b5f836a806..0888c3726414 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 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