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
@@ -792,7 +792,7 @@ static int sun4ican_probe(struct platform_device *pdev)
|
||||
|
||||
addr = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(addr)) {
|
||||
err = -EBUSY;
|
||||
err = PTR_ERR(addr);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user