[PATCH] [resend] video: s3c-fb: fix misleading kfree in remove function

Subsystems: framebuffer layer, the rest

STALE5551d

2 messages, 2 authors, 2011-06-09 · open the first message on its own page

[PATCH] [resend] video: s3c-fb: fix misleading kfree in remove function

From: Jingoo Han <hidden>
Date: 2011-06-09 04:26:31

This patch fixes misleading kfree in remove function.

Signed-off-by: Jingoo Han <redacted>
---
 drivers/video/s3c-fb.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 0352afa..148e19d 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1487,11 +1487,10 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
 
 	release_mem_region(sfb->regs_res->start, resource_size(sfb->regs_res));
 
-	kfree(sfb);
-
 	pm_runtime_put_sync(sfb->dev);
 	pm_runtime_disable(sfb->dev);
 
+	kfree(sfb);
 	return 0;
 }
 
-- 
1.7.1

Re: [PATCH] [resend] video: s3c-fb: fix misleading kfree in remove function

From: Paul Mundt <hidden>
Date: 2011-06-09 06:04:57

On Thu, Jun 09, 2011 at 01:26:31PM +0900, Jingoo Han wrote:
This patch fixes misleading kfree in remove function.
On Thu, Jun 09, 2011 at 01:26:38PM +0900, Jingoo Han wrote:
This patch fixes mishandling in virtual resolution checking.
Previously, virtual resolution is changed to virtual_x and virtual_y
which mean the size for buffer allocation, when s3c_fb_check_var is
called by fb_check_var. However, it is meaningless, since virtual_x
and virtual_y are fixed and user cannot change virtual resolution.
Therefore, virtual resolution should be more than resolution
such as xres and yres.
On Thu, Jun 09, 2011 at 01:26:45PM +0900, Jingoo Han wrote:
This patch moves enabling channel for window, because there should
be enabling channel before enabling window. If the sequence is
reversed, it makes the problem in displaying images to lcd panel.
All applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help