diff options
author | Stefan Chulski <stefanc@marvell.com> | 2021-02-14 14:38:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-15 02:40:43 +0100 |
commit | 9ad78d81cb766c9bd4b6ae39905af11a55800876 (patch) | |
tree | 197f2f9357612d113470f2f1e3a652a62c83f689 /drivers | |
parent | net: mvpp2: improve Packet Processor version check (diff) | |
download | linux-9ad78d81cb766c9bd4b6ae39905af11a55800876.tar.xz linux-9ad78d81cb766c9bd4b6ae39905af11a55800876.zip |
net: mvpp2: improve mvpp2_get_sram return
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 4e1a24c0aa3d..bc98f521108e 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -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) |