Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2ACACDB482 for ; Wed, 18 Oct 2023 14:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=b+OVt3Afq9u76fCe/4HBScDMiKZ3fSnWn7Jh758wmqI=; b=keK6ZOA9uAf17O 48YzOdf7MFSBmGbXs7lsMoLYbHmUThdVUdRYpvnqikUG6iayNjsAr8h258Jit2ak/9kHDdCdAVInF K09ydl4tpRwsyHEg7mdgiYNnzC2D7JkdeAkWln5ylO6l7/a7+wyrh+D1NieY87SXyvt0uy9Hx1obc 7jMC8OM0tO3MM/JgFQrukrG0awGSRpPvHXfknCY28fYHrUsJgu/U1BZcsrx6jH7xCNZoZF2Hl7hAo e2I75UD1cjztIrHFkpr/s4eUaZc42IVfYNe+b+ZkrFJp6MCsnWvb4R4qLi4UAr9zMb3lnPPCnoOod YFeux6AoXZxhzAxxbB1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt7Kn-00Espu-2a; Wed, 18 Oct 2023 14:15:41 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt7Kg-00EsmP-1U for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2023 14:15:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D844BCE258F; Wed, 18 Oct 2023 14:15:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93C9DC433BF; Wed, 18 Oct 2023 14:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697638532; bh=qB7p11kq92ju5zQ1FFaqx18gv/GjAtoRJ9VDOf18Xv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rk6O2KSvOapGmDA++Objf59wtxOFvrrvEI9LNulUjxNp4YLXtKsEvItjYrLPxSwwH ni5FJm7s2pmI+TXS9S8dYdkBrvC7ilEflJ7zwcjcU2kr7BsdJxovrAhw6L7BMd2GC+ X5w0NhqXqeet5i+OArh5thvLYw74HBwBY/VOdptA0urZmShpehPbFDoXM8qU0eWqJu Qm+K/5v1xnPSGLibrIB8T7eA1UN//pHfNyiLcTZYZWvIF+Roazn1nr3H6HB2btMKqd DS/g2aVL7PH7xL2kMhuDHUI45EgOgzwio/IW5hwU2SSDvTFG++ctZujvcSX00ZX6RQ QLYa7zlQBU7Dw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zhang Shurong , Linus Walleij , Vinod Koul , Sasha Levin , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 4/7] dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe Date: Wed, 18 Oct 2023 10:15:20 -0400 Message-Id: <20231018141525.1335533-4-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018141525.1335533-1-sashal@kernel.org> References: <20231018141525.1335533-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.4.258 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_071534_680315_584BB281 X-CRM114-Status: GOOD ( 10.19 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Zhang Shurong [ Upstream commit 0618c077a8c20e8c81e367988f70f7e32bb5a717 ] The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by calling pm_runtime_disable when error returns. Signed-off-by: Zhang Shurong Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/tencent_DD2D371DB5925B4B602B1E1D0A5FA88F1208@qq.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ste_dma40.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 96a808b487cbe..fa0ad8581edcc 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3700,6 +3700,7 @@ static int __init d40_probe(struct platform_device *pdev) regulator_disable(base->lcpa_regulator); regulator_put(base->lcpa_regulator); } + pm_runtime_disable(base->dev); kfree(base->lcla_pool.alloc_map); kfree(base->lookup_log_chans); -- 2.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel