diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-11-08 03:27:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-14 15:14:11 -0500 |
commit | 70847780dca19f3707d9fa433f68edf8cbaf91f2 (patch) | |
tree | abcda945fba6a857359dbde13587cbc8b3056deb /drivers/usb/host | |
parent | b240add62c7c0e15bfaba59fa37bd44480e31681 (diff) |
usb: host: tegra: remove pointless NULL check in tegra_ehci_remove()
Test for tegra and hcd in tegra_ehci_remove() look like potential
NULL pointer dereference, but in fact those tests are not needed,
so remove these pointless tests entirely.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 94ee3212094..ef0a6ef7875 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -775,9 +775,6 @@ static int tegra_ehci_remove(struct platform_device *pdev) | |||
775 | struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); | 775 | struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); |
776 | struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci); | 776 | struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci); |
777 | 777 | ||
778 | if (tegra == NULL || hcd == NULL) | ||
779 | return -EINVAL; | ||
780 | |||
781 | pm_runtime_get_sync(&pdev->dev); | 778 | pm_runtime_get_sync(&pdev->dev); |
782 | pm_runtime_disable(&pdev->dev); | 779 | pm_runtime_disable(&pdev->dev); |
783 | pm_runtime_put_noidle(&pdev->dev); | 780 | pm_runtime_put_noidle(&pdev->dev); |