Release efifb's colormap in efifb_destroy()
authorPeter Jones <pjones@redhat.com>
Thu, 25 Jul 2013 15:48:11 +0000 (11:48 -0400)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Aug 2013 07:46:23 +0000 (10:46 +0300)
commit907355a97f06af8d23c62fcb482cd91b8576972d
treecf463c351dd003ad0d81475b82389a10c959ed9b
parent6e665fb330e2bcf642557c517b517a05b0e0f31b
Release efifb's colormap in efifb_destroy()

This was found by Alexandra Kossovsky, who noted this traceback from
kmemleak:

> unreferenced object 0xffff880216fcfe00 (size 512):
>   comm "swapper/0", pid 1, jiffies 4294895429 (age 1415.320s)
>   hex dump (first 32 bytes):
>     00 00 00 00 00 00 00 00 aa aa aa aa aa aa aa aa  ................
>     55 55 55 55 55 55 55 55 ff ff ff ff ff ff ff ff  UUUUUUUU........
>   backtrace:
>     [<ffffffff813e415c>] kmemleak_alloc+0x21/0x3e
>     [<ffffffff8111c17f>]
>     kmemleak_alloc_recursive.constprop.57+0x16/0x18
>     [<ffffffff8111e63b>] __kmalloc+0xf9/0x144
>     [<ffffffff8123d9cf>] fb_alloc_cmap_gfp+0x47/0xe1
>     [<ffffffff8123da77>] fb_alloc_cmap+0xe/0x10
>     [<ffffffff81aff40a>] efifb_probe+0x3e9/0x48f
>     [<ffffffff812c566f>] platform_drv_probe+0x34/0x5e
>     [<ffffffff812c3e6d>] driver_probe_device+0x98/0x1b4
>     [<ffffffff812c3fd7>] __driver_attach+0x4e/0x6f
>     [<ffffffff812c25bf>] bus_for_each_dev+0x57/0x8a
>     [<ffffffff812c3984>] driver_attach+0x19/0x1b
>     [<ffffffff812c362b>] bus_add_driver+0xde/0x201
>     [<ffffffff812c453f>] driver_register+0x8c/0x110
>     [<ffffffff812c510d>] platform_driver_register+0x41/0x43
>     [<ffffffff812c5127>] platform_driver_probe+0x18/0x8a
>     [<ffffffff81aff002>] efifb_init+0x276/0x295

Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/efifb.c