* [PATCH] sh: free-without-alloc fix for sh_mobile_lcdcfb
@ 2010-10-13 7:17 Magnus Damm
2010-10-13 10:25 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2010-10-13 7:17 UTC (permalink / raw)
To: linux-sh
From: Magnus Damm <damm@opensource.se>
Without this fix the LCDC driver will try to free
framebuffer memory even though the allocation failed.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/video/sh_mobile_lcdcfb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- 0001/drivers/video/sh_mobile_lcdcfb.c
+++ work/drivers/video/sh_mobile_lcdcfb.c 2010-10-07 18:36:45.000000000 +0900
@@ -1324,8 +1324,10 @@ static int sh_mobile_lcdc_remove(struct
if (priv->ch[i].sglist)
vfree(priv->ch[i].sglist);
- dma_free_coherent(&pdev->dev, info->fix.smem_len,
- info->screen_base, priv->ch[i].dma_handle);
+ if (info->screen_base)
+ dma_free_coherent(&pdev->dev, info->fix.smem_len,
+ info->screen_base,
+ priv->ch[i].dma_handle);
fb_dealloc_cmap(&info->cmap);
framebuffer_release(info);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: free-without-alloc fix for sh_mobile_lcdcfb
2010-10-13 7:17 [PATCH] sh: free-without-alloc fix for sh_mobile_lcdcfb Magnus Damm
@ 2010-10-13 10:25 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2010-10-13 10:25 UTC (permalink / raw)
To: linux-sh
On Wed, Oct 13, 2010 at 04:17:45PM +0900, Magnus Damm wrote:
> Without this fix the LCDC driver will try to free
> framebuffer memory even though the allocation failed.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-13 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13 7:17 [PATCH] sh: free-without-alloc fix for sh_mobile_lcdcfb Magnus Damm
2010-10-13 10:25 ` Paul Mundt
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).