From 7b3a327acb3a63fddc14f2b3ecd19a7ea8f41b3e Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Wed, 8 Aug 2012 17:29:36 +0530 Subject: 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 Reviewed-on: http://git-master/r/122088 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Yarlagadda Tested-by: Krishna Yarlagadda Reviewed-by: Venkat Moganty --- drivers/usb/host/ehci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3