mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq()
@ 2023-03-23  9:53 Mingxuan Xiang
  2023-03-23 10:29 ` Sergei Shtylyov
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Mingxuan Xiang @ 2023-03-23  9:53 UTC (permalink / raw)
  To: Thinh Nguyen, Greg Kroah-Hartman
  Cc: hust-os-kernel-patches, Dongliang Mu, Mingxuan Xiang, linux-usb,
	linux-kernel

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@hust.edu.cn>
---
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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-03-24  5:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  9:53 [PATCH v2] usb: dwc3: host: remove dead code in dwc3_host_get_irq() Mingxuan Xiang
2023-03-23 10:29 ` Sergei Shtylyov
2023-03-23 10:54   ` Oliver Neukum
2023-03-23 11:13     ` Dan Carpenter
2023-03-23 13:48       ` Oliver Neukum
2023-03-23 14:06         ` Dan Carpenter
2023-03-23 15:38           ` Oliver Neukum
2023-03-23 10:52 ` Dan Carpenter
2023-03-23 11:00   ` Dan Carpenter
2023-03-23 11:12     ` Dan Carpenter
2023-03-23 15:40 ` Greg Kroah-Hartman
2023-03-24  1:46   ` Dongliang Mu
2023-03-24  5:17     ` Dan Carpenter
2023-03-24  5:19       ` Dongliang Mu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®