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 76B84C46CA1 for ; Wed, 18 Oct 2023 14:14:17 +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=fB0BLqNBLlNB0vts5p78v8bUIahvJuTR8EBmcGvfCAo=; b=UcOrCeQyKJ55f6 zCl97I11Uvs0zfVBXuc1G5FbaF72LxSlttOaQpzhL4yDvtxiK0LyDDXjkwLIbf9CeIy7z4iCBkrGr LVorvDA9BwJckn5dlafChJYe7eodCCpszSjJQZ7U0cYC/OLRR6kuZYfKBclHUXPHcj6CXItXdPd96 BlDSptt1I9OQDp79MAOypgrEdVtnmuY9E3Y7dWw+a/g2DkZvizMOVfOA17IP9nf2OZNwMdbndemRY 7JcPpQDegI7QdM1p0p63mbWw49gUUJnBOYSp6vM0yQ95YbY1KJBqSflWovarpFo2URDIuLe6RMhaI Khsvib8xIyTReA+dhKag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt7J6-00Es0n-1i; Wed, 18 Oct 2023 14:13:56 +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 1qt7J3-00Eryk-1M for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2023 14:13:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 86B39CE25CF; Wed, 18 Oct 2023 14:13:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56474C433BB; Wed, 18 Oct 2023 14:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697638431; bh=P4YR0JF60wR3gB0ovQ5eJQozNjbFCVdheaLbeEFofR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EOlnMN2901IFBlHqq1DwpQufODYsizH7tXXhP+0OHb01oZcqRHllf8fby76icYsHY akhP7G4TeCCG38QmG8bgV0+JYhBgVy9OTUNIBxYItrpaMADJQxq+1ClXhjipb4hPdY p+bwAw04hCeXN12++GoN+TjWFy+3Ya8wzSfYCuYk96gl6gD+qAdz3wHizzVnH4Nwdc LYgseiDCdjXCAl5XSCn0d8/z74LrNfgneojjLw+ddTyFKn6jwnPll0ToYDH98u1/9g RsOdZfaKrevDL8w6NpqG/jZidWRFMfe4jfoQEOlaSADgOR0P0m3wHl1GxRC3bFvh6G MYzxufSRuyVVw== 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 6.1 13/19] dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe Date: Wed, 18 Oct 2023 10:13:15 -0400 Message-Id: <20231018141323.1334898-13-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018141323.1334898-1-sashal@kernel.org> References: <20231018141323.1334898-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.58 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_071353_634079_A7C59830 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 3b09fdc507e04..594b016e76efc 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3697,6 +3697,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