Skip to content

Commit

Permalink
usb: host: xhci-tegra: deny IRQ0
Browse files Browse the repository at this point in the history
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: e84fce0 ("usb: xhci: Add NVIDIA Tegra XUSB controller driver")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
  • Loading branch information
Sergey Shtylyov authored and intel-lab-lkp committed Oct 26, 2021
1 parent 1d942c9 commit 23ab86f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/host/xhci-tegra.c
Expand Up @@ -1439,6 +1439,8 @@ static int tegra_xusb_probe(struct platform_device *pdev)
tegra->xhci_irq = platform_get_irq(pdev, 0);
if (tegra->xhci_irq < 0)
return tegra->xhci_irq;
if (!tegra->xhci_irq)
return -ENIVAL;

tegra->mbox_irq = platform_get_irq(pdev, 1);
if (tegra->mbox_irq < 0)
Expand Down

0 comments on commit 23ab86f

Please sign in to comment.