]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mvpp2: improve mvpp2_get_sram return
authorStefan Chulski <stefanc@marvell.com>
Sun, 14 Feb 2021 13:38:36 +0000 (15:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 01:40:43 +0000 (17:40 -0800)
Use PTR_ERR_OR_ZERO instead of IS_ERR and PTR_ERR.
Non functional change.

Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

index 4e1a24c0aa3dd8cb35625ce7923e746b77b41b90..bc98f521108ed6a74d97de5d84ad97b7667649c5 100644 (file)
@@ -7277,10 +7277,8 @@ static int mvpp2_get_sram(struct platform_device *pdev,
        }
 
        priv->cm3_base = devm_ioremap_resource(&pdev->dev, res);
-       if (IS_ERR(priv->cm3_base))
-               return PTR_ERR(priv->cm3_base);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(priv->cm3_base);
 }
 
 static int mvpp2_probe(struct platform_device *pdev)