video: add missing framebuffer_release in error path
authoraxel lin <axel.lin@gmail.com>
Tue, 15 Feb 2011 09:35:02 +0000 (09:35 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 22 Mar 2011 07:35:44 +0000 (16:35 +0900)
This patch fixes a memory leak in the error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/cg14.c
drivers/video/cg6.c
drivers/video/tcx.c

index e2c85b0db632adb71871d3f353ee88894cf442fb..f1889500662757d337d066648964e685d53e7f78 100644 (file)
@@ -565,6 +565,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
        cg14_unmap_regs(op, info, par);
+       framebuffer_release(info);
 
 out_err:
        return err;
index 4ffad90bde4205e52d1c56a10f498677d0e21fc1..179e96cdb323fa9e91f22f42be016f55a32993ea 100644 (file)
@@ -821,6 +821,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
        cg6_unmap_regs(op, info, par);
+       framebuffer_release(info);
 
 out_err:
        return err;
index 855b71993f61f9cb0f10822c9dd810375178bcc5..07c66e9466343bec9b9f7cd0741698903d44e1e5 100644 (file)
@@ -480,6 +480,7 @@ out_dealloc_cmap:
 
 out_unmap_regs:
        tcx_unmap_regs(op, info, par);
+       framebuffer_release(info);
 
 out_err:
        return err;