DORMANTno replies

[PATCH v2] usb: host: tegra: remove pointless NULL check in tegra_ehci_remove()

From: Wei Yongjun <hidden>
Date: 2012-11-08 08:27:33
Subsystem: the rest, usb ehci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

From: Wei Yongjun <redacted>

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 <redacted>
---
v1 -> v2: remove those tests entirely
---
 drivers/usb/host/ehci-tegra.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 6223d175..40daeaa 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -778,9 +778,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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help