Commit 70847780 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b240add6
......@@ -775,9 +775,6 @@ static int tegra_ehci_remove(struct platform_device *pdev)
struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci);
if (tegra == NULL || hcd == NULL)
return -EINVAL;
pm_runtime_get_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment