Commit 4fa13872 authored by Yalong Zou's avatar Yalong Zou Committed by Greg Kroah-Hartman
Browse files

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: default avatarYalong Zou <yalongz@hust.edu.cn>
Signed-off-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230309150815.1884260-1-yalongz@hust.edu.cn


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3754c41c
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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;