aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc/tilcdc_panel.c
diff options
context:
space:
mode:
authorGuido Martínez <guido@vanguardiasur.com.ar>2014-06-17 10:17:09 -0400
committerDave Airlie <airlied@redhat.com>2014-07-07 21:25:26 -0400
commitc9a3ad25eddfdb898114a9d73cdb4c3472d9dfca (patch)
tree6b1cbcdf4ec08fd010e89655d06abcb3a27f72d9 /drivers/gpu/drm/tilcdc/tilcdc_panel.c
parenteb565a2bbadc6a5030a6dbe58db1aa52453e7edf (diff)
drm/tilcdc: fix double kfree
display_timings_release calls kfree on the display_timings object passed to it. Calling kfree after it is wrong. SLUB debug showed the following warning: ============================================================================= BUG kmalloc-64 (Tainted: G W ): Object already free ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Allocated in of_get_display_timings+0x2c/0x214 age=601 cpu=0 pid=884 __slab_alloc.constprop.79+0x2e0/0x33c kmem_cache_alloc+0xac/0xdc of_get_display_timings+0x2c/0x214 panel_probe+0x7c/0x314 [tilcdc] platform_drv_probe+0x18/0x48 [..snip..] INFO: Freed in panel_destroy+0x18/0x3c [tilcdc] age=0 cpu=0 pid=907 __slab_free+0x34/0x330 panel_destroy+0x18/0x3c [tilcdc] tilcdc_unload+0xd0/0x118 [tilcdc] drm_dev_unregister+0x24/0x98 [..snip..] Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> Tested-by: Darren Etheridge <detheridge@ti.com> Cc: <stable@vger.kernel.org> #v3.9+ Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_panel.c')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_panel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index f5bed331e42e..b0b9396f41a6 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -286,10 +286,8 @@ static void panel_destroy(struct tilcdc_module *mod)
286{ 286{
287 struct panel_module *panel_mod = to_panel_module(mod); 287 struct panel_module *panel_mod = to_panel_module(mod);
288 288
289 if (panel_mod->timings) { 289 if (panel_mod->timings)
290 display_timings_release(panel_mod->timings); 290 display_timings_release(panel_mod->timings);
291 kfree(panel_mod->timings);
292 }
293 291
294 tilcdc_module_cleanup(mod); 292 tilcdc_module_cleanup(mod);
295 kfree(panel_mod->info); 293 kfree(panel_mod->info);