diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c index c8b6d908f0cc..4a160761b3ff 100644 --- a/drivers/net/ethernet/lantiq_xrx200.c +++ b/drivers/net/ethernet/lantiq_xrx200.c @@ -461,9 +461,9 @@ static int xrx200_probe(struct platform_device *pdev) } priv->pmac_reg = devm_ioremap_resource(dev, res); - if (!priv->pmac_reg) { + if (IS_ERR(priv->pmac_reg)) { dev_err(dev, "failed to request and remap io ranges\n"); - return -ENOMEM; + return PTR_ERR(priv->pmac_reg); } priv->chan_rx.dma.irq = platform_get_irq_byname(pdev, "rx");