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 268BACDB47E for ; Wed, 18 Oct 2023 14:16:49 +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=Ngfk43F7pPzWS/xdzmec05Gn7drYXsrmUB8xgoiHzWk=; b=cONULGYbmVPIxu LB0BU4tw0uHW30p1sVn/jIN5tWcIOI8TFt1/XKG0Yr8kWRYswvOcDBX5iiX/CyKShZUShLmBQTFNx seDiKzfqiiqGHEDewag4EbAD6UIZ+U5Ne5RA6/0wL8rQTMAX650Df2dfQqodwqtWkl3xdZSTROal8 VIMJI2nfANWAyF7VHkKnaM/ZKSBKe7XpP1v26ujl993dRIoewJIlEu9Kj4w7vq7P9HdNRFdO3Z8y7 JKjx5efKKrTQ7kiQDYbGPj0WqeBNJ7kbtQ+4Seyzrsy0aEd8n4dzx97JGKbfAybYdeai/+qbOIY2y E8C8r5WlNcP336EhXtMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt7LW-00Et9U-0r; Wed, 18 Oct 2023 14:16:26 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt7LT-00Et6q-1T for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2023 14:16:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id F3D3D617EF; Wed, 18 Oct 2023 14:16:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E900CC433CC; Wed, 18 Oct 2023 14:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697638582; bh=WHnnd90rLnf8jpNRxFcfyRVBWvywCkM/Goa6sLpEoPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yx8s/waTsgP4Mt9MfguFIudKGqszHukXkpyOuLdy15MF0svyXi355L52Jo+vr6dSX hvmnxHe21FPZln+UzdhOIi8cbJlrNz3Jh+zkvyECXoEli1WVHIy6F/SEsKkF9rLsid w5kEMCqYza5fsnUfHc9rAjK9CAn+0ExOQJAqxdtH7q1vWaPUMa4iK4RrX6pwkJYkW5 qeqQnsQ9bJpG63wCdI2rmJauJXM41Vc6DiJpZ2QSi4xDFzmAO/K7PGT8oJ5rY1vfKb mOTnlp+gnT+lS9CniY7T01cKG1Sn1kyXJ8lBDfqcF4lp8MFEp3StTNvFbdVLsHY4NY og5eCYuSFMqBQ== 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 4.14 4/7] dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe Date: Wed, 18 Oct 2023 10:16:09 -0400 Message-Id: <20231018141613.1335848-4-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018141613.1335848-1-sashal@kernel.org> References: <20231018141613.1335848-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 4.14.327 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_071623_544944_34A8B91F X-CRM114-Status: GOOD ( 10.08 ) 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 498d9886ed9bc..bb39b04d67d71 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3678,6 +3678,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