diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-25 17:30:24 +0800 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-10-28 21:11:23 -0500 |
commit | dde8e3ee6b37fa33690604302bebfe7b576c3802 (patch) | |
tree | fdede613ba05e0360f3c5b42c92db7a878fb7f7f /arch/powerpc/sysdev/mv64x60_dev.c | |
parent | fd1348d098b5d0f633c869b50a74cfcbeb9834f5 (diff) |
powerpc/mv643xx_eth: fix return check in mv64x60_eth_register_shared_pdev()
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_wei@trendmicro.com.cn>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/sysdev/mv64x60_dev.c')
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c index 4a25c26f0bf4..a3a8fad8537d 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; } |