Re: [PATCH v3 2/6] usb: host: ehci-atmel: fix deferred probing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/2021 at 21:46, Sergey Shtylyov wrote:
The driver overrides the error codes and IRQ0 returned by platform_get_irq()
to -ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe
permanently instead of the deferred probing. Switch to propagating the error
codes upstream. IRQ0 is no longer returned by platform_get_irq(), so we now
can safely ignore it...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
Thanks, best regards,
  Nicolas

---
Changes in version 3:
- corrected the "Fixes:" tag;
- added Alan's ACK.

Changes in version 2:
- removed the check for IRQ0, updated the patch description accordingly.

  drivers/usb/host/ehci-atmel.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 05d41fd65f25..bc3fdb588e6b 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -104,8 +104,8 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
         pr_debug("Initializing Atmel-SoC USB Host Controller\n");

         irq = platform_get_irq(pdev, 0);
-       if (irq <= 0) {
-               retval = -ENODEV;
+       if (irq < 0) {
+               retval = irq;
                 goto fail_create_hcd;
         }

--
2.26.3



--
Nicolas Ferre



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux