]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
stmmac: devm_reset_control_get can return PROBE_DEFER
authorPhil Reid <preid@electromag.com.au>
Thu, 9 Apr 2015 01:41:34 +0000 (18:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Apr 2015 18:11:19 +0000 (14:11 -0400)
In socfpga_dwmac_parse_data forward error code from devm_reset_control_get.
This gives the driver another chance to laod if altr,rst-mgr is loaded after
the network driver.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c

index e97074cd5800a7c67466b60925cb6dfaf6aaab0b..1cacea9765b45c4f9ad3c8280e9ba1eed7709d82 100644 (file)
@@ -91,7 +91,7 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
                                                  STMMAC_RESOURCE_NAME);
        if (IS_ERR(dwmac->stmmac_rst)) {
                dev_info(dev, "Could not get reset control!\n");
-               return -EINVAL;
+               return PTR_ERR(dwmac->stmmac_rst);
        }
 
        dwmac->interface = of_get_phy_mode(np);