Message ID | 20211018183930.8448-14-s.shtylyov@omp.ru (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Explicitly deny IRQ0 in the USB host drivers | expand |
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index 4a8456f12a73..ec1d38d5d140 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -113,6 +113,8 @@ static int ohci_platform_probe(struct platform_device *dev) irq = platform_get_irq(dev, 0); if (irq < 0) return irq; + if (!irq) + return -EINVAL; hcd = usb_create_hcd(&ohci_platform_hc_driver, &dev->dev, dev_name(&dev->dev));
If platform_get_irq() returns IRQ0 (considered invalid according to Linus) the driver blithely passes it to usb_add_hcd() that treats IRQ0 as no IRQ at all. Deny IRQ0 right away, returning -EINVAL from the probe() method... Fixes: fa3364b5a2d7 ("USB: OHCI: Add a generic platform device driver") Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- drivers/usb/host/ohci-platform.c | 2 ++ 1 file changed, 2 insertions(+)