Commit 7e5ae24a authored by Varka Bhadram's avatar Varka Bhadram Committed by David S. Miller

ethernet: marvell: remove unnecessary check

devm_ioremap_resource checks platform_get_resource() return value.
We can remove the duplicate check here.
Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 534249d6
...@@ -1450,16 +1450,14 @@ static int pxa168_eth_probe(struct platform_device *pdev) ...@@ -1450,16 +1450,14 @@ static int pxa168_eth_probe(struct platform_device *pdev)
pep = netdev_priv(dev); pep = netdev_priv(dev);
pep->dev = dev; pep->dev = dev;
pep->clk = clk; pep->clk = clk;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) {
err = -ENODEV;
goto err_netdev;
}
pep->base = devm_ioremap_resource(&pdev->dev, res); pep->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(pep->base)) { if (IS_ERR(pep->base)) {
err = -ENOMEM; err = -ENOMEM;
goto err_netdev; goto err_netdev;
} }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
BUG_ON(!res); BUG_ON(!res);
dev->irq = res->start; dev->irq = res->start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment