lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  6 Dec 2021 19:34:37 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     Vinod Koul <vkoul@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang7@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>
Cc:     Dongliang Mu <mudongliangabcd@...il.com>,
        Baolin Wang <baolin.wang@...eadtrum.com>,
        dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] dmaengine: sprd: move pm_runtime_disable to err_rpm

When pm_runtime_get_sync fails, it forgets to invoke pm_runtime_disable
in the label err_rpm.

Fix this by moving pm_runtime_disable to label err_rpm.

Fixes: 9b3b8171f7f4 ("dmaengine: sprd: Add Spreadtrum DMA driver")
Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
---
 drivers/dma/sprd-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index 4357d2395e6b..ae8b2cfebfee 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -1226,8 +1226,8 @@ static int sprd_dma_probe(struct platform_device *pdev)
 	dma_async_device_unregister(&sdev->dma_dev);
 err_register:
 	pm_runtime_put_noidle(&pdev->dev);
-	pm_runtime_disable(&pdev->dev);
 err_rpm:
+	pm_runtime_disable(&pdev->dev);
 	sprd_dma_disable(sdev);
 	return ret;
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ