summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/pxa168_eth.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2020-05-22 14:03:21 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-24 02:28:25 +0300
commitef24d6c3d6965158dfe23ae961d87e9a343e18a2 (patch)
tree923489ccb4df091a557366098084e2541dc0a713 /drivers/net/ethernet/marvell/pxa168_eth.c
parentd04322a0da1e86aedaa322ce933cfb8c0191d1eb (diff)
downloadlinux-ef24d6c3d6965158dfe23ae961d87e9a343e18a2.tar.xz
net: Fix return value about devm_platform_ioremap_resource()
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/pxa168_eth.c')
-rw-r--r--drivers/net/ethernet/marvell/pxa168_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index 7a0d785b826c..17243bb5ba91 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1418,7 +1418,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
pep->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pep->base)) {
- err = -ENOMEM;
+ err = PTR_ERR(pep->base);
goto err_netdev;
}