phy: stm32-usbphyc: fix wakeup irq probe deferral

The return code isn't set to the real error code returned by of_irq_get().
In case it returns -EPROBE_DEFER, currently the probe will likely return
zero, preventing later retries. The PHYs will never get registered.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Change-Id: Ib92f49c4fea9cc61675d838d4f1e12a3cc2d6d3f
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/261448
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com>
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
This commit is contained in:
Fabrice Gasnier
2022-07-26 17:55:05 +02:00
committed by Eric Fourmont
parent 2d760de2d0
commit 1d9ee6aa7c

View File

@ -745,9 +745,10 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
}
/* Get optional wakeup interrupt */
usbphyc->phys[port]->wakeirq = of_irq_get(child, 0);
if (usbphyc->phys[port]->wakeirq == -EPROBE_DEFER)
ret = of_irq_get(child, 0);
if (ret == -EPROBE_DEFER)
goto put_child;
usbphyc->phys[port]->wakeirq = ret;
/* Configure phy tuning */
stm32_usbphyc_phy_tuning(usbphyc, child, index);