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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210524070700.3032039-3-yangyingliang@huawei.com>
Date:   Mon, 24 May 2021 15:07:00 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <linux-imx@....com>
CC:     <shawnguo@...nel.org>
Subject: [PATCH -next 2/2] ARM: imx: add missing clk_disable_unprepare() in imx_mmdc_remove()

clock source is prepared and enabled by clk_prepare_enable()
in probe function, but no disable or unprepare in remove.

Fixes: 9454a0caff6a ("ARM: imx: add mmdc ipg clock operation for mmdc")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
 arch/arm/mach-imx/mmdc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index c313eb1f614c..9de929f8cf6c 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -78,6 +78,7 @@ static const struct of_device_id imx_mmdc_dt_ids[] = {
 };
 
 static void __iomem *mmdc_base;
+static struct clk *mmdc_ipg_clk;
 
 #ifdef CONFIG_PERF_EVENTS
 
@@ -533,6 +534,7 @@ static int imx_mmdc_remove(struct platform_device *pdev)
 	kfree(pmu_mmdc);
 #endif
 	iounmap(mmdc_base);
+	clk_disable_unprepare(mmdc_ipg_clk);
 	return 0;
 }
 
@@ -540,7 +542,6 @@ static int imx_mmdc_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	void *reg;
-	struct clk *mmdc_ipg_clk;
 	u32 val;
 	int err;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ