diff options
author | Joachim Eastwood <manabian@gmail.com> | 2015-05-20 20:03:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-21 18:57:26 -0400 |
commit | 15ffac73bb3e029e9f86deb45837b9a4999a9a46 (patch) | |
tree | 0ff07d6c4575eec8635ec840c7861e50b851ab04 /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |
parent | e56788cf13eef6e998bc03200df9e00f64a3202d (diff) | |
download | linux-15ffac73bb3e029e9f86deb45837b9a4999a9a46.tar.bz2 |
stmmac: change the stmmac_dvr_probe return type to int
Since stmmac_dvr_probe takes care of setting driver data and
assign resources to the priv structure there is no need to
access the priv structure from the other probe functions.
This mean that this function can be changed into just return
an int and thus simplifying the callers.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index af4f0358f13f..e8d4c96a282a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -256,7 +256,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev) int ret = 0; struct resource *res; struct device *dev = &pdev->dev; - struct stmmac_priv *priv = NULL; struct plat_stmmacenet_data *plat_dat = NULL; memset(&stmmac_res, 0, sizeof(stmmac_res)); @@ -335,15 +334,7 @@ int stmmac_pltfr_probe(struct platform_device *pdev) return ret; } - priv = stmmac_dvr_probe(&(pdev->dev), plat_dat, &stmmac_res); - if (IS_ERR(priv)) { - pr_err("%s: main driver probe failed", __func__); - return PTR_ERR(priv); - } - - pr_debug("STMMAC platform driver registration completed"); - - return 0; + return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); } EXPORT_SYMBOL_GPL(stmmac_pltfr_probe); |