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>
This commit is contained in:
Yalong Zou 2023-03-09 23:08:15 +08:00 committed by Greg Kroah-Hartman
parent 3754c41c76
commit 4fa1387261
1 changed files with 0 additions and 5 deletions

View File

@ -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;