From mboxrd@z Thu Jan 1 00:00:00 1970 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 D2D35C433EF for ; Mon, 10 Jan 2022 16:12:44 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=S1SuBMxHPOP/a089/aroM2JQRsNVMCAUywXyvjNIJv4=; b=AHiOBRT12o7K8gw57S85EqUNBO OA0Pqf9J+BWbGWBxkLRImgFMkiZeumRUDq4s9yKCW+SM80rDyyxMGx786VmEsjgf4VTZdkqX4myX8 Wn6jm0a8naDoryO77j5f1gN1yUmyndTTQ6mXpur0JgFFtTxdjt8Rv6MUc6MNpRvzl03SSBA8k0MB2 J47i5E6BtAGU7BCe9VH744/cLl05pyfjENxtA6wG2jC/g3mrBPDpsymcdTxGZgVyIShKTur6eStCI MKlzLjYncRwY05/dDnxRc9BsVNILstotOID7YvoiTiO+0c2aWOvNEdLeKpsOwjcbgTySL8r8/J9Ik QAJNfulQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6xGS-00CJ8y-60; Mon, 10 Jan 2022 16:11:20 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6xGN-00CJ6f-Uu for linux-arm-kernel@lists.infradead.org; Mon, 10 Jan 2022 16:11:18 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20ADo8Tj021602; Mon, 10 Jan 2022 17:11:03 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=G0yUSQsLfDcfZw5v2vGpXxdzo++cGRi64INcl+rPjA4=; b=QFtqsp6QQ3IVh9a/ajeAsDwe9Txg/0e1+JRjSF3obXv8sHCiF4QLXgL0ho5Geh7VDfhS 72YslM6blIQaSSKJKJEgbFzunW8EFfmSu9bRsqHwirUXXDXclZN4yC+kD1/LfgqGYAin x8/fj8btxe1g8ffS6X0jYx5KC6WGs3vAXOLT4qPTvVgkZHzPttbNQRvJ81kJ4SQp7FtY NKvgSJddKG+kRv+uduspI/9KzWtPf01gQONc8vpFSkNuMyaUvADJjFx7xNssE2lgpr3C CmMT+SlSwsBB/KmCJkQzTRGUKrXavfGOY+HxIlFVQxfO28u2kSuAWbbg/pXmP0+iY5ZJ dA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3dgh6uj1x0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jan 2022 17:11:03 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9971110002A; Mon, 10 Jan 2022 17:11:02 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8EA9A20757D; Mon, 10 Jan 2022 17:11:02 +0100 (CET) Received: from lmecxl0995.lme.st.com (10.75.127.49) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Mon, 10 Jan 2022 17:11:01 +0100 Subject: Re: [Linux-stm32] [PATCH] dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe To: Miaoqian Lin CC: Alexandre Torgue , Pierre-Yves MORDRET , , Vinod Koul , Maxime Coquelin , , , References: <20220108085336.11992-1-linmq006@gmail.com> From: Amelie DELAUNAY Message-ID: <37a66156-a616-058d-b3c0-6d2ca22a12ed@foss.st.com> Date: Mon, 10 Jan 2022 17:11:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220108085336.11992-1-linmq006@gmail.com> Content-Language: en-US X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-10_07,2022-01-10_02,2021-12-02_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220110_081116_873567_D1B3409F X-CRM114-Status: GOOD ( 21.75 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/8/22 9:53 AM, Miaoqian Lin wrote: > The pm_runtime_enable will increase power disable depth. > If the probe fails, we should use pm_runtime_disable() to balance > pm_runtime_enable(). > > Fixes: 4f3ceca254e0 ("dmaengine: stm32-dmamux: Add PM Runtime support") > Signed-off-by: Miaoqian Lin Thanks for your patch, Reviewed-by: Amelie Delaunay > --- > drivers/dma/stm32-dmamux.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c > index a42164389ebc..d5d55732adba 100644 > --- a/drivers/dma/stm32-dmamux.c > +++ b/drivers/dma/stm32-dmamux.c > @@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev) > ret = of_dma_router_register(node, stm32_dmamux_route_allocate, > &stm32_dmamux->dmarouter); > if (ret) > - goto err_clk; > + goto pm_disable; > > return 0; > > +pm_disable: > + pm_runtime_disable(&pdev->dev); > err_clk: > clk_disable_unprepare(stm32_dmamux->clk); > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel