From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: daniel.lezcano@linaro.org, tglx@linutronix.de,
vincent.guittot@linaro.org, linus.walleij@linaro.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] clocksource: nomadik-mtu: Unmap region obtained by of_iomap
Date: Thu, 22 Sep 2016 19:27:44 +0530 [thread overview]
Message-ID: <1474552664-8046-1-git-send-email-arvind.yadav.cs@gmail.com> (raw)
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
next reply other threads:[~2016-09-22 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 13:57 Arvind Yadav [this message]
2016-09-23 8:20 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474552664-8046-1-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®