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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <57d92940.6329c80a.3d959.9d78@mx.google.com>
Date:   Wed, 14 Sep 2016 16:08:31 +0530
From:   arvind.yadav.cs@...il.com
To:     mturquette@...libre.com, sboyd@...eaurora.org
Cc:     a.hajda@...sung.com, lee.jones@...aro.org,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Arvind Yadav <arvind.yadav.cs@...il.com>
Subject: [PATCH] clk: st: clk-flexgen: Unmap region obtained by of_iomap

From: Arvind Yadav <arvind.yadav.cs@...il.com>

Free memory mapping, if probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/clk/st/clk-flexgen.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 546bd79..af8df7b 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -278,8 +278,10 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 		return;
 
 	parents = flexgen_get_parents(np, &num_parents);
-	if (!parents)
+	if (!parents) {
+		iounmap(reg);
 		return;
+	}
 
 	clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
 	if (!clk_data)
@@ -337,6 +339,8 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	return;
 
 err:
+	if (reg)
+		iounmap(reg);
 	if (clk_data)
 		kfree(clk_data->clks);
 	kfree(clk_data);
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ