diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2014-10-24 06:12:08 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-28 02:16:01 +0300 |
commit | 7e5ae24aa009110c7c1340bf682a3e6586de39da (patch) | |
tree | bcb35f3841fc83cad67b9fd56f2b8e6098c491d3 /drivers/net/ethernet/marvell/pxa168_eth.c | |
parent | 534249d6e095a607bc8769bdd60941d3887dd386 (diff) | |
download | linux-7e5ae24aa009110c7c1340bf682a3e6586de39da.tar.xz |
ethernet: marvell: 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/marvell/pxa168_eth.c')
-rw-r--r-- | drivers/net/ethernet/marvell/pxa168_eth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index bee4c369f0fe..21ddecef151e 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c @@ -1450,16 +1450,14 @@ static int pxa168_eth_probe(struct platform_device *pdev) pep = netdev_priv(dev); pep->dev = dev; pep->clk = clk; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - err = -ENODEV; - goto err_netdev; - } pep->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(pep->base)) { err = -ENOMEM; goto err_netdev; } + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); BUG_ON(!res); dev->irq = res->start; |