From: Libo Chen <clbchenlibo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org
Cc: uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 2/2] i2c: pxa: no need release_mem_region before request_mem_region successful
Date: Mon, 6 May 2013 21:11:21 +0800 [thread overview]
Message-ID: <5187ABF9.4000903@huawei.com> (raw)
move release_mem_region above kfree(i2c) && below clk_put(i2c->clk)
Signed-off-by: Libo Chen <libo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/i2c/busses/i2c-pxa.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index ea6d45d..3188cd0 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1129,7 +1129,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->clk = clk_get(&dev->dev, NULL);
if (IS_ERR(i2c->clk)) {
ret = PTR_ERR(i2c->clk);
- goto eclk;
+ goto emm;
}
i2c->reg_base = ioremap(res->start, resource_size(res));
@@ -1206,10 +1206,11 @@ ereqirq:
iounmap(i2c->reg_base);
eremap:
clk_put(i2c->clk);
+emm:
+ release_mem_region(res->start, resource_size(res));
eclk:
kfree(i2c);
emalloc:
- release_mem_region(res->start, resource_size(res));
return ret;
}
--
1.7.1
next reply other threads:[~2013-05-06 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 13:11 Libo Chen [this message]
[not found] ` <5187ABF9.4000903-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-05-07 2:59 ` [PATCH 2/2] i2c: pxa: no need release_mem_region before request_mem_region successful Gu Zheng
[not found] ` <51886E12.8070701-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-05-07 5:55 ` Libo Chen
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=5187ABF9.4000903@huawei.com \
--to=clbchenlibo.chen-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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;
as well as URLs for NNTP newsgroup(s).