usb: musb: Fix deferred probing
authorZhu Wang <wangzhu9@huawei.com>
Fri, 4 Aug 2023 10:54:30 +0000 (18:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 12:45:58 +0000 (14:45 +0200)
When platform_get_irq_byname() 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/20230804105430.95773-1-wangzhu9@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_core.c

index ecbd378..b24adb5 100644 (file)
@@ -2610,8 +2610,8 @@ static int musb_probe(struct platform_device *pdev)
        int             irq = platform_get_irq_byname(pdev, "mc");
        void __iomem    *base;
 
-       if (irq <= 0)
-               return -ENODEV;
+       if (irq < 0)
+               return irq;
 
        base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(base))