diff mbox series

[-next] usb: host: ohci-tmio: Remove redundant if statement

Message ID 20220518024347.213402-1-lizhengyu3@huawei.com
State New
Headers show
Series [-next] usb: host: ohci-tmio: Remove redundant if statement | expand

Commit Message

Li Zhengyu May 18, 2022, 2:43 a.m. UTC
(ret == 0) is true when (ret) is false, so remove it.
Also remove unreachable code.

Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
---
 drivers/usb/host/ohci-tmio.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
index 49539b9f0e94..6bcb0cb53f7c 100644
--- a/drivers/usb/host/ohci-tmio.c
+++ b/drivers/usb/host/ohci-tmio.c
@@ -243,12 +243,8 @@  static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
 	ret = usb_add_hcd(hcd, irq, 0);
 	if (ret)
 		goto err_add_hcd;
-
 	device_wakeup_enable(hcd->self.controller);
-	if (ret == 0)
-		return ret;
-
-	usb_remove_hcd(hcd);
+	return ret;
 
 err_add_hcd:
 	tmio_stop_hc(dev);