Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488899 > unrolled thread

[PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2016-09-22 16:00 +0200
Last post2016-09-23 10:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap Arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-09-22 16:00 +0200
    Re: [PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap Linus Walleij <linus.walleij@linaro.org> - 2016-09-23 10:30 +0200

#1488899 — [PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2016-09-22 16:00 +0200
Subject[PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap
Message-ID<skcHE-74T-21@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1489839

FromLinus Walleij <linus.walleij@linaro.org>
Date2016-09-23 10:30 +0200
Message-ID<sku1P-1iw-5@gated-at.bofh.it>
In reply to#1488899
On Thu, Sep 22, 2016 at 3:57 PM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:

> Free memory mapping, if nmdk_timer_of_init is not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web