Commit 1ffbb037 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

sh: free-without-alloc fix for sh_mobile_lcdcfb

Without this fix the LCDC driver will try to free
framebuffer memory even though the allocation failed.
Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 51c6c9bb
......@@ -1243,8 +1243,10 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
if (priv->ch[i].sglist)
vfree(priv->ch[i].sglist);
if (info->screen_base)
dma_free_coherent(&pdev->dev, info->fix.smem_len,
info->screen_base, priv->ch[i].dma_handle);
info->screen_base,
priv->ch[i].dma_handle);
fb_dealloc_cmap(&info->cmap);
framebuffer_release(info);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment