diff mbox

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

Message ID 1307593591-4507-1-git-send-email-jg1.han@samsung.com (mailing list archive)
State Accepted
Commit 72ba4cb608e7937792f3d61349ef616bbffda832
Headers show

Commit Message

Jingoo Han June 9, 2011, 4:26 a.m. UTC
This patch fixes misleading kfree in remove function.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/s3c-fb.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Paul Mundt June 9, 2011, 6:04 a.m. UTC | #1
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 }