summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/gadget.c
diff options
context:
space:
mode:
authorYalong Zou <yalongz@hust.edu.cn>2023-03-09 23:08:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-16 12:14:14 +0100
commit4fa1387261e725a418066f8f46ea87a6ba0e5be1 (patch)
treea2611c1dd627b2930002854416a363cbe2cd4386 /drivers/usb/dwc3/gadget.c
parent3754c41c76867e41fe720555dc186ba4b3cccad9 (diff)
usb: remove dead code in dwc3_gadget_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_gadget_get_irq(), removing them to solve this problem. Signed-off-by: Yalong Zou <yalongz@hust.edu.cn> Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn> Link: https://lore.kernel.org/r/20230309150815.1884260-1-yalongz@hust.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r--drivers/usb/dwc3/gadget.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 07989c645a94..a1ebb30c15fa 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -4402,11 +4402,6 @@ static int dwc3_gadget_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;