--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -2714,9 +2714,9 @@ static int bcm_enetsw_probe(struct platf
 	if (ret)
 		goto out;
 
-	priv->base = devm_ioremap_resource(&pdev->dev, res_mem);
-	if (IS_ERR(priv->base)) {
-		ret = PTR_ERR(priv->base);
+ 	priv->base = devm_ioremap(&pdev->dev, res_mem->start, resource_size(res_mem));
+ 	if (priv->base == NULL) {
+		ret = -ENOMEM;
 		goto out;
 	}
 
