summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/b53/b53_srab.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2020-05-22 19:03:21 +0800
committerDavid S. Miller <davem@davemloft.net>2020-05-23 16:28:25 -0700
commitef24d6c3d6965158dfe23ae961d87e9a343e18a2 (patch)
tree923489ccb4df091a557366098084e2541dc0a713 /drivers/net/dsa/b53/b53_srab.c
parentd04322a0da1e86aedaa322ce933cfb8c0191d1eb (diff)
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/dsa/b53/b53_srab.c')
-rw-r--r--drivers/net/dsa/b53/b53_srab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_srab.c b/drivers/net/dsa/b53/b53_srab.c
index 0a1be5259be0..38cd8285ac67 100644
--- a/drivers/net/dsa/b53/b53_srab.c
+++ b/drivers/net/dsa/b53/b53_srab.c
@@ -609,7 +609,7 @@ static int b53_srab_probe(struct platform_device *pdev)
priv->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->regs))
- return -ENOMEM;
+ return PTR_ERR(priv->regs);
dev = b53_switch_alloc(&pdev->dev, &b53_srab_ops, priv);
if (!dev)