summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2015-05-20 20:03:08 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-21 18:57:26 -0400
commit15ffac73bb3e029e9f86deb45837b9a4999a9a46 (patch)
tree0ff07d6c4575eec8635ec840c7861e50b851ab04 /drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
parente56788cf13eef6e998bc03200df9e00f64a3202d (diff)
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_pci.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 2c663ec2dfb3..d71a721ea61c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -164,7 +164,6 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
struct stmmac_pci_info *info = (struct stmmac_pci_info *)id->driver_data;
struct plat_stmmacenet_data *plat;
struct stmmac_resources res;
- struct stmmac_priv *priv;
int i;
int ret;
@@ -220,15 +219,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
res.wol_irq = pdev->irq;
res.irq = pdev->irq;
- priv = stmmac_dvr_probe(&pdev->dev, plat, &res);
- if (IS_ERR(priv)) {
- dev_err(&pdev->dev, "%s: main driver probe failed\n", __func__);
- return PTR_ERR(priv);
- }
-
- dev_dbg(&pdev->dev, "STMMAC PCI driver registration completed\n");
-
- return 0;
+ return stmmac_dvr_probe(&pdev->dev, plat, &res);
}
/**