2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00

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>
This commit is contained in:
Wei Yongjun 2013-10-25 17:30:24 +08:00 committed by Scott Wood
parent fd1348d098
commit dde8e3ee6b

View File

@ -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;
}