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>
This commit is contained in:

committed by
David S. Miller

parent
d04322a0da
commit
ef24d6c3d6
@@ -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)
|
||||
|
Reference in New Issue
Block a user