usb: gadget: udc: gr_udc: Fix deferred probing
When platform_get_irq() fails, it may return -EPROBE_DEFER, which suggested deferred probing, it is very important to propagate it upstream. We cannot override it with other error code. Commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") makes sure IRQ0 is not returned. Signed-off-by: Zhu Wang <wangzhu9@huawei.com> Link: https://lore.kernel.org/r/20230804110005.97061-1-wangzhu9@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d3af2f4c04
commit
4f4bda58c5
@ -2136,15 +2136,15 @@ static int gr_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(regs);
|
||||
|
||||
dev->irq = platform_get_irq(pdev, 0);
|
||||
if (dev->irq <= 0)
|
||||
return -ENODEV;
|
||||
if (dev->irq < 0)
|
||||
return dev->irq;
|
||||
|
||||
/* Some core configurations has separate irqs for IN and OUT events */
|
||||
dev->irqi = platform_get_irq(pdev, 1);
|
||||
if (dev->irqi > 0) {
|
||||
dev->irqo = platform_get_irq(pdev, 2);
|
||||
if (dev->irqo <= 0)
|
||||
return -ENODEV;
|
||||
if (dev->irqo < 0)
|
||||
return dev->irqo;
|
||||
} else {
|
||||
dev->irqi = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user