diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-05-22 19:03:21 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-23 16:28:25 -0700 |
commit | ef24d6c3d6965158dfe23ae961d87e9a343e18a2 (patch) | |
tree | 923489ccb4df091a557366098084e2541dc0a713 /drivers/net/can/sun4i_can.c | |
parent | d04322a0da1e86aedaa322ce933cfb8c0191d1eb (diff) | |
download | lwn-ef24d6c3d6965158dfe23ae961d87e9a343e18a2.tar.gz lwn-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/can/sun4i_can.c')
-rw-r--r-- | drivers/net/can/sun4i_can.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c index e3ba8ab0cbf4..e2c6cf4b2228 100644 --- a/drivers/net/can/sun4i_can.c +++ b/drivers/net/can/sun4i_can.c @@ -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; } |