usb: ehci-msm-hsic: avoid double free of platform data

When device tree is enabled, the platform data structure is allocated
via devm_kzalloc and assigned it to pdev->dev.platform_data. This
memory is freed twice during platform device unregistration in
devres_release_all() and platform_device_release() functions. Assign
pdev->dev.platform_data to NULL in device driver remove method to
avoid this double free.

Change-Id: I713e0fa97e00124166a727718c0a31ab5e2c2d3b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
1 file changed