linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource: timer-sp804: Unmap region obtained by of_iomap
@ 2016-09-21 15:18 Arvind Yadav
  0 siblings, 0 replies; 2+ messages in thread
From: Arvind Yadav @ 2016-09-21 15:18 UTC (permalink / raw)
  To: daniel.lezcano, tglx; +Cc: arnd, linux-kernel

Free memory mapping, if integrator_cp_of_init is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/clocksource/timer-sp804.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index d078633..419995d 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -306,6 +306,7 @@ static int __init integrator_cp_of_init(struct device_node *np)
 	clk = of_clk_get(np, 0);
 	if (IS_ERR(clk)) {
 		pr_err("Failed to get clock");
+		iounmap(base);
 		return PTR_ERR(clk);
 	}
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] clocksource: timer-sp804: Unmap region obtained by of_iomap.
@ 2017-06-28 10:09 Arvind Yadav
  0 siblings, 0 replies; 2+ messages in thread
From: Arvind Yadav @ 2017-06-28 10:09 UTC (permalink / raw)
  To: daniel.lezcano, tglx; +Cc: linux-kernel

In case of error at init time, rollback iomapping.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/clocksource/timer-sp804.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c
index 2d575a8c..5830bc9 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -306,7 +306,8 @@ static int __init integrator_cp_of_init(struct device_node *np)
 	clk = of_clk_get(np, 0);
 	if (IS_ERR(clk)) {
 		pr_err("Failed to get clock\n");
-		return PTR_ERR(clk);
+		ret = PTR_ERR(clk);
+		goto err;
 	}
 
 	/* Ensure timer is disabled */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-28 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 15:18 [PATCH] clocksource: timer-sp804: Unmap region obtained by of_iomap Arvind Yadav
  -- strict thread matches above, loose matches on Subject: below --
2017-06-28 10:09 Arvind Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).