* [PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap
@ 2016-09-22 13:57 Arvind Yadav
2016-09-23 8:20 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2016-09-22 13:57 UTC (permalink / raw)
To: daniel.lezcano, tglx, vincent.guittot, linus.walleij; +Cc: linux-kernel
Free memory mapping, if nmdk_timer_of_init is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/clocksource/nomadik-mtu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
index 3c124d1..d99e415c 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -267,18 +267,21 @@ static int __init nmdk_timer_of_init(struct device_node *node)
pclk = of_clk_get_by_name(node, "apb_pclk");
if (IS_ERR(pclk)) {
pr_err("could not get apb_pclk");
+ iounmap(base);
return PTR_ERR(pclk);
}
clk = of_clk_get_by_name(node, "timclk");
if (IS_ERR(clk)) {
pr_err("could not get timclk");
+ iounmap(base);
return PTR_ERR(clk);
}
irq = irq_of_parse_and_map(node, 0);
if (irq <= 0) {
pr_err("Can't parse IRQ");
+ iounmap(base);
return -EINVAL;
}
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-23 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 13:57 [PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap Arvind Yadav
2016-09-23 8:20 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®