diff options
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 0ebc297..844e081 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -2481,10 +2481,9 @@ static int bcmgenet_probe(struct platform_device *pdev) } r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_request_and_ioremap(&pdev->dev, r); - if (!priv->base) { - dev_err(&pdev->dev, "can't ioremap\n"); - err = -EINVAL; + priv->base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(priv->base)) { + err = PTR_ERR(priv->base); goto err; } |