diff options
author | Venu Byravarasu <vbyravarasu@nvidia.com> | 2012-08-08 17:29:36 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-08-09 18:06:00 -0700 |
commit | 7b3a327acb3a63fddc14f2b3ecd19a7ea8f41b3e (patch) | |
tree | 31ae932fc3e3a92344ed1fa7f183c79d615fbcde | |
parent | df73b460996b2f6e2c0b0d93b3679d6dca9d4615 (diff) |
usb: host: fix tegra_ehci_remove() warnings
usb_put_hcd calls hcd_release which frees up memory allocated
for hcd. As iounmap is called after usb_put_hcd and it is trying
to access hcd->regs, getting warning messages during unload of
USB. Hence fixing it.
bug 1023362
Change-Id: Ic339395edad9a76a9eeae290eff3517d2c714477
Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-on: http://git-master/r/122088
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 51670a91726e..08f12be6dbd0 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -550,10 +550,10 @@ static int tegra_ehci_remove(struct platform_device *pdev) tegra_usb_phy_power_on(tegra->phy); usb_remove_hcd(hcd); - usb_put_hcd(hcd); tegra_usb_phy_power_off(tegra->phy); tegra_usb_phy_close(tegra->phy); iounmap(hcd->regs); + usb_put_hcd(hcd); return 0; } |