summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/wiznet/w5300.c
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2014-10-24 07:42:06 +0530
committerDavid S. Miller <davem@davemloft.net>2014-10-27 19:16:01 -0400
commit5e9b4dce850d6e3d3dbd1ee7f9466c875c20e487 (patch)
tree179aada544ba94c10828942f9f37a79e11fbb35d /drivers/net/ethernet/wiznet/w5300.c
parent958501163ddd6ea22a98f94fa0e7ce6d4734e5c4 (diff)
downloadtalos-op-linux-5e9b4dce850d6e3d3dbd1ee7f9466c875c20e487.tar.gz
talos-op-linux-5e9b4dce850d6e3d3dbd1ee7f9466c875c20e487.zip
ethernet: wiznet: remove unnecessary check
devm_ioremap_resource checks platform_get_resource() return value. We can remove the duplicate check here. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/wiznet/w5300.c')
-rw-r--r--drivers/net/ethernet/wiznet/w5300.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
index f961f14a0473..7974b7d90fcc 100644
--- a/drivers/net/ethernet/wiznet/w5300.c
+++ b/drivers/net/ethernet/wiznet/w5300.c
@@ -558,14 +558,12 @@ static int w5300_hw_probe(struct platform_device *pdev)
}
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mem)
- return -ENXIO;
- mem_size = resource_size(mem);
-
priv->base = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
+ mem_size = resource_size(mem);
+
spin_lock_init(&priv->reg_lock);
priv->indirect = mem_size < W5300_BUS_DIRECT_SIZE;
if (priv->indirect) {
OpenPOWER on IntegriCloud