Message ID | 20230804105430.95773-1-wangzhu9@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | adbe9720e573d0466b506df3b848bcf4c4dd63c9 |
Headers | show |
Series | [v4] usb: musb: Fix deferred probing | expand |
On 8/4/23 1:54 PM, Zhu Wang wrote: > When platform_get_irq_byname() fails, it may return -EPROBE_DEFER, > which suggested deferred probing, it is very important to propagate it Suggests. Perhaps the tense may be fixed up when applying... > 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> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> [...] MBR, Sergey
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index ecbd3784bec3..b24adb5b399f 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -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))
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> --- Changes in v2: - Update the commit message, present the reason of replacing the return value of the probe. --- Changes in v3: - Update the commit message, explain in detail why the return value of platform_get_irq_byname() cannot be override. --- Changes in v4: - Update the title to "Fix deferred probing". - Update the commit message, emphasize the -EPROBE_DEFER cannot be overwritten by other error code. - Remove -next tag. --- drivers/usb/musb/musb_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)