[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230425015532.13622-1-lihuya@hust.edu.cn>
Date: Tue, 25 Apr 2023 09:55:32 +0800
From: Liang Yuhang <lihuya@...t.edu.cn>
To: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: hust-os-kernel-patches@...glegroups.com,
Liang Yuhang <lihuya@...t.edu.cn>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH RESEND v2] usb: dwc3: remove dead code in dwc3_otg_get_irq
platform_get_irq() only return non-zero irq number on success, or
negative error number on failure.
There is no need to check the return value of platform_get_irq()
to determine the return value of dwc3_otg_get_irq(), removing
them to solve this problem.
Signed-off-by: Liang Yuhang <lihuya@...t.edu.cn>
---
v1 -> v2: change name to real name
---
drivers/usb/dwc3/drd.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index 039bf241769a..c2e09700212d 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -154,11 +154,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
goto out;
irq = platform_get_irq(dwc3_pdev, 0);
- if (irq > 0)
- goto out;
-
- if (!irq)
- irq = -EINVAL;
out:
return irq;
--
2.34.1
Powered by blists - more mailing lists