Message ID | 20211018183930.8448-10-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-da8xx.c b/drivers/usb/host/ohci-da8xx.c index 1371b0c249ec..6d08ab2bf163 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c @@ -449,6 +449,10 @@ static int ohci_da8xx_probe(struct platform_device *pdev) error = -ENODEV; goto err; } + if (!hcd_irq) { + error = -EINVAL; + goto err; + } error = usb_add_hcd(hcd, hcd_irq, 0); if (error)
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: efe7daf2231a ("USB: OHCI: DA8xx/OMAP-L1x glue layer") Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> --- drivers/usb/host/ohci-da8xx.c | 4 ++++ 1 file changed, 4 insertions(+)