linux/drivers/usb
Christophe Leroy 8836402d4b usb: Check !irq instead of irq == NO_IRQ
NO_IRQ is a relic from the old days. It is not used anymore in core
functions. By the way, function irq_of_parse_and_map() returns value 0
on error.

In some drivers, NO_IRQ is erroneously used to check the return of
irq_of_parse_and_map().

It is not a real bug today because the only architectures using the
drivers being fixed by this patch define NO_IRQ as 0, but there are
architectures which define NO_IRQ as -1. If one day those
architectures start using the non fixed drivers, there will be a
problem.

Long time ago Linus advocated for not using NO_IRQ, see
https://lkml.org/lkml/2005/11/21/221 . He re-iterated the same view
recently in https://lkml.org/lkml/2022/10/12/622

So test !irq instead of tesing irq == NO_IRQ.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/13feefdf6b240817944e6441e26a8ddc1d81ced1.1668102802.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-11 10:28:38 +01:00
..
atm usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
c67x00 USB: c67x00: remove unnecessary check of res 2022-05-12 11:36:46 +02:00
cdns3 usb: cdns3: adjust the partial logic of cdnsp_pci_remove 2022-10-22 13:21:40 +02:00
chipidea usb: chipidea: core: wrap ci_handle_power_lost() with CONFIG_PM_SLEEP 2022-11-09 12:37:44 +01:00
class USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
common usb: ulpi: use DEFINE_SHOW_ATTRIBUTE to simplify ulpi_regs 2022-09-27 10:36:54 +02:00
core usb: core: stop USB enumeration if too many retries 2022-11-08 16:50:21 +01:00
dwc2 usb: dwc2: platform: Improve error reporting for problems during .remove() 2022-10-22 13:24:27 +02:00
dwc3 usb: dwc3: gadget: Reduce TRB IOC settings 2022-11-08 16:46:46 +01:00
early usb: early: xhci-dbc: Fix xdbc number parsing 2022-03-15 18:20:34 +01:00
fotg210 usb: fotg210-udc: Fix ages old endianness issues 2022-11-11 10:18:59 +01:00
gadget usb: gadget: f_ecm: Always set current gadget in ecm_bind() 2022-11-09 12:39:33 +01:00
host usb: Check !irq instead of irq == NO_IRQ 2022-11-11 10:28:38 +01:00
image usb/image: fix repeated words in comments 2022-07-27 14:33:53 +02:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-05-19 18:10:59 +02:00
misc Linux 6.1-rc3 2022-10-31 05:47:21 +01:00
mon usb: mon: make mmapped memory read only 2022-09-22 15:52:29 +02:00
mtu3 usb: mtu3: fix failed runtime suspend in host only mode 2022-09-30 13:55:48 +02:00
musb usb: musb: jz4740: Support the generic PHY framework 2022-11-09 12:39:13 +01:00
phy usb: phy: jz4770: Remove driver 2022-11-09 12:39:13 +01:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-06-21 16:39:03 +02:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
storage USB/Thunderbolt changes for 6.1-rc1 2022-10-07 16:48:26 -07:00
typec Linux 6.1-rc3 2022-10-31 05:47:21 +01:00
usbip USB: usbip: missing lock in stub down 2022-10-22 13:22:25 +02:00
Kconfig usb: fotg210: Collect pieces of dual mode controller 2022-11-09 12:38:09 +01:00
Makefile usb: fotg210: Collect pieces of dual mode controller 2022-11-09 12:38:09 +01:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00