From: Wei Yongjun Date: Thu, 8 Nov 2012 08:27:33 +0000 (+0800) Subject: usb: host: tegra: remove pointless NULL check in tegra_ehci_remove() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70847780dca19f3707d9fa433f68edf8cbaf91f2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 94ee3212094e..ef0a6ef7875b 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) 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);