sh: free-without-alloc fix for sh_mobile_lcdcfb
Subsystems (2)
PATCH 1/1 sh: free-without-alloc fix for sh_mobile_lcdcfb
From: Magnus Damm <[email protected]>
Without this fix the LCDC driver will try to free framebuffer memory even though the allocation failed.
Signed-off-by Magnus Damm <[email protected]>
---
drivers/video/sh_mobile_lcdcfb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/video/sh_mobile_lcdcfb.c +4 -2
@@ -1324,8 +1324,10 @@ static int sh_mobile_lcdc_remove(structif (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); }
Paul Mundt
AppliedQuoted 2 lines · Magnus Damm
Without this fix the LCDC driver will try to free framebuffer memory even though the allocation failed.
Applied, thanks.