[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1613309917-17569-4-git-send-email-stefanc@marvell.com>
Date: Sun, 14 Feb 2021 15:38:36 +0200
From: <stefanc@...vell.com>
To: <netdev@...r.kernel.org>
CC: <thomas.petazzoni@...tlin.com>, <davem@...emloft.net>,
<nadavh@...vell.com>, <ymarkman@...vell.com>,
<linux-kernel@...r.kernel.org>, <stefanc@...vell.com>,
<kuba@...nel.org>, <linux@...linux.org.uk>, <mw@...ihalf.com>,
<andrew@...n.ch>, <rmk+kernel@...linux.org.uk>,
<atenart@...nel.org>
Subject: [net-next 3/4] net: mvpp2: improve mvpp2_get_sram return
From: Stefan Chulski <stefanc@...vell.com>
Use PTR_ERR_OR_ZERO instead of IS_ERR and PTR_ERR.
Non functional change.
Signed-off-by: Stefan Chulski <stefanc@...vell.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 4e1a24c..bc98f52 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)
--
1.9.1
Powered by blists - more mailing lists