summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2015-05-20 20:03:09 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-21 18:57:26 -0400
commitdef5cd3cfd01704ca9bad1c32e75f0144b746511 (patch)
treeebf5fc9695a9d8f40af29908802601e8ab2988e4 /drivers
parent15ffac73bb3e029e9f86deb45837b9a4999a9a46 (diff)
downloadlinux-def5cd3cfd01704ca9bad1c32e75f0144b746511.tar.bz2
stmmac: drop unnecessary dt checks in stmmac_probe_config_dt
Since the caller already check the presence of a of_node there is no need to repeat the check in stmmac_probe_config_dt. There is also no point in checking the return value of the of_match_device function since if there wasn't match in the first place we would never be in this function. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index e8d4c96a282a..1664c0186f5b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -112,13 +112,7 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
const struct of_device_id *device;
struct device *dev = &pdev->dev;
- if (!np)
- return -ENODEV;
-
device = of_match_device(dev->driver->of_match_table, dev);
- if (!device)
- return -ENODEV;
-
if (device->data) {
const struct stmmac_of_data *data = device->data;
plat->has_gmac = data->has_gmac;