From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

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 <yongjun_...@trendmicro.com.cn>
---
 arch/powerpc/sysdev/mv64x60_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/mv64x60_dev.c 
b/arch/powerpc/sysdev/mv64x60_dev.c
index 4a25c26..a3a8fad 100644
--- 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;
        }
 

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to