usb: otg: tegra: Do not free platform data twice
Preetham Chandru R [Mon, 31 Dec 2012 14:17:13 +0000 (19:17 +0530)]
when platform device is unregistered, the call to platform_device_release()
will kfree the platform data. Hence do not free the platform data again.

Bug 1209618

Change-Id: Ied67f550223ec199da4bc8e38a12e7ee94c2d98a
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/187806
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

drivers/usb/otg/tegra-otg.c

index ce19f77..12c359b 100644 (file)
@@ -173,8 +173,6 @@ static void tegra_stop_host(struct tegra_otg_data *tegra)
 
        if (pdev) {
                /* unregister host from otg */
-               kfree(pdev->dev.platform_data);
-               pdev->dev.platform_data = NULL;
                platform_device_unregister(pdev);
                tegra->pdev = NULL;
        }