usb: host: tegra: Fix panic in tegra_ehci_remove()
authorVinayak Pane <vpane@nvidia.com>
Thu, 21 Nov 2013 21:48:58 +0000 (13:48 -0800)
committerVinayak Pane <vpane@nvidia.com>
Wed, 27 Nov 2013 20:36:46 +0000 (12:36 -0800)
commit556f51b1c616c494fdcfaea986b77c7768d5597d
tree326d8fc84711eb199b46a92372a139e9af38a2d4
parentc9a4022116a54f4a209ed451bd7df1f5f71b622a
usb: host: tegra: Fix panic in tegra_ehci_remove()

device_remove_file() uses hcd->self.controller, but hcd is
already freed by usb_put_hcd(). This causes kernel panic
when USB device is being removed.

Fix this issue by calling the sysfs_remove_file() before kref_put()

Bug 1409766

Change-Id: I026b9fe193d93bb65c16d454083a270c410e62dc
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/334154
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/usb/host/ehci-tegra.c