diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-05-22 13:03:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-24 01:28:25 +0200 |
commit | ef24d6c3d6965158dfe23ae961d87e9a343e18a2 (patch) | |
tree | 923489ccb4df091a557366098084e2541dc0a713 /drivers/net/dsa | |
parent | Merge tag 'rxrpc-fixes-20200523-v2' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-ef24d6c3d6965158dfe23ae961d87e9a343e18a2.tar.xz linux-ef24d6c3d6965158dfe23ae961d87e9a343e18a2.zip |
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')
-rw-r--r-- | drivers/net/dsa/b53/b53_srab.c | 2 |
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) |