aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorOmar Ramirez Luna <omar.ramirez@ti.com>2012-01-30 20:20:18 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-08 17:14:14 -0500
commit44c5435064b5e6182167b40a7f259969dbcaf1b8 (patch)
treec01a542d1d9049b049ab7408aa907c730eafabec /drivers/staging
parent5a63177a6967698df58c6c93d0db3a3586e0b028 (diff)
staging: tidspbridge: fix incorrect free to drv_datap
This structure is still used after it has been freed, since it is being allocated in probe, calls to free it have been moved to module's remove routine. This should fix the follwoing messages when attempting to remove the module: drv_get_first_dev_extension: Failed to retrieve the object handle drv_get_first_dev_extension: Failed to retrieve the object handle drv_destroy: Failed to store DRV object mgr_destroy: Failed to store MGR object Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/tidspbridge/core/tiomap3430.c2
-rw-r--r--drivers/staging/tidspbridge/rmgr/drv_interface.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index e1c4492a710..dde559d06c4 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -1046,8 +1046,6 @@ static int bridge_dev_destroy(struct bridge_dev_context *dev_ctxt)
1046 1046
1047 /* Free the driver's device context: */ 1047 /* Free the driver's device context: */
1048 kfree(drv_datap->base_img); 1048 kfree(drv_datap->base_img);
1049 kfree(drv_datap);
1050 dev_set_drvdata(bridge, NULL);
1051 kfree((void *)dev_ctxt); 1049 kfree((void *)dev_ctxt);
1052 return status; 1050 return status;
1053} 1051}
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index 8bac511c627..385740bad0d 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -410,6 +410,9 @@ static int __devexit omap34_xx_bridge_remove(struct platform_device *pdev)
410 DBC_ASSERT(ret == true); 410 DBC_ASSERT(ret == true);
411 } 411 }
412 412
413 kfree(drv_datap);
414 dev_set_drvdata(bridge, NULL);
415
413func_cont: 416func_cont:
414 mem_ext_phys_pool_release(); 417 mem_ext_phys_pool_release();
415 418