linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] i2c: pxa: no need release_mem_region before request_mem_region successful
@ 2013-05-06 13:11 Libo Chen
       [not found] ` <5187ABF9.4000903-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Libo Chen @ 2013-05-06 13:11 UTC (permalink / raw)
  To: wsa-z923LK4zBo2bacvFa/9K2g
  Cc: uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Li Zefan


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

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

end of thread, other threads:[~2013-05-07  5:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 13:11 [PATCH 2/2] i2c: pxa: no need release_mem_region before request_mem_region successful Libo Chen
     [not found] ` <5187ABF9.4000903-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-05-07  2:59   ` Gu Zheng
     [not found]     ` <51886E12.8070701-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-05-07  5:55       ` Libo Chen

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).