]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ethernet: stmmac: manage the get_irq probe defer case
authorFabien Dessenne <fabien.dessenne@st.com>
Wed, 24 Apr 2019 09:35:49 +0000 (11:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Apr 2019 15:25:39 +0000 (11:25 -0400)
Manage the -EPROBE_DEFER error case for "stm32_pwr_wakeup"  IRQ.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c

index 062a600fa5a76310571f9aa6db84639c81546c09..21428537e231490db23f5ce539a95e15367ec6ed 100644 (file)
@@ -333,6 +333,9 @@ static int stm32mp1_parse_data(struct stm32_dwmac *dwmac,
         */
        dwmac->irq_pwr_wakeup = platform_get_irq_byname(pdev,
                                                        "stm32_pwr_wakeup");
+       if (dwmac->irq_pwr_wakeup == -EPROBE_DEFER)
+               return -EPROBE_DEFER;
+
        if (!dwmac->clk_eth_ck && dwmac->irq_pwr_wakeup >= 0) {
                err = device_init_wakeup(&pdev->dev, true);
                if (err) {