Skip to content
Commit db2c2b16 authored by Mingxuan Xiang's avatar Mingxuan Xiang Committed by Greg Kroah-Hartman
Browse files

usb: dwc3: host: remove dead code in dwc3_host_get_irq()



According to the description of platform_get_irq()
 * Return: non-zero IRQ number on success,
 			negative error number on failure.
and the code, platform_get_irq() will return -EINVAL
instead of IRQ0.

So platform_get_irq() no longer returns 0, there is no
need to check whether the return value is 0.

Found by Smatch:
drivers/usb/dwc3/host.c:60 dwc3_host_get_irq()
	warn: platform_get_irq() does not return zero

Signed-off-by: default avatarMingxuan Xiang <mx_xiang@hust.edu.cn>
Reviewed-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20230324060934.1686859-1-mx_xiang@hust.edu.cn
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c03ff66d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment