[PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



platform_get_irq() no longer returns 0, so there is no
need to check whether the return value is 0.

Signed-off-by: Mingxuan Xiang <mx_xiang@xxxxxxxxxxx>
---
v1->v2: remove redundant goto
 drivers/usb/dwc3/host.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index f6f13e7f1ba1..ca1e8294e835 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -54,12 +54,8 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
 	irq = platform_get_irq(dwc3_pdev, 0);
 	if (irq > 0) {
 		dwc3_host_fill_xhci_irq_res(dwc, irq, NULL);
-		goto out;
 	}
 
-	if (!irq)
-		irq = -EINVAL;
-
 out:
 	return irq;
 }
-- 
2.39.2




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux