projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd1348d
)
powerpc/mv643xx_eth: fix return check in mv64x60_eth_register_shared_pdev()
author
Wei Yongjun
<
[email protected]
>
Fri, 25 Oct 2013 09:30:24 +0000
(17:30 +0800)
committer
Scott Wood
<
[email protected]
>
Tue, 29 Oct 2013 02:11:23 +0000
(21:11 -0500)
In case of error, the function platform_device_register_simple() returns
RR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <
[email protected]
>
Signed-off-by: Scott Wood <
[email protected]
>
arch/powerpc/sysdev/mv64x60_dev.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/sysdev/mv64x60_dev.c
b/arch/powerpc/sysdev/mv64x60_dev.c
index 4a25c26f0bf43e51ef5fe6d37c0fc1fcf788450d..a3a8fad8537d10c4efff7f17b515e8b20cab4947 100644
(file)
--- a/
arch/powerpc/sysdev/mv64x60_dev.c
+++ b/
arch/powerpc/sysdev/mv64x60_dev.c
@@
-228,7
+228,7
@@
static struct platform_device * __init mv64x60_eth_register_shared_pdev(
if (id == 0) {
pdev = platform_device_register_simple("orion-mdio", -1, &r[1], 1);
- if (
!pdev
)
+ if (
IS_ERR(pdev)
)
return pdev;
}