Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7ba9f7c authored by zhong jiang's avatar zhong jiang Committed by Thomas Gleixner
Browse files

x86/platform/olpc: Use PTR_ERR_OR_ZERO()



Replace the open coded equivalent with PTR_ERR_OR_ZERO().

Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1533053286-34990-1-git-send-email-zhongjiang@huawei.com
parent 24cfd8ca
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -311,10 +311,8 @@ static int __init add_xo1_platform_devices(void)
		return PTR_ERR(pdev);

	pdev = platform_device_register_simple("olpc-xo1", -1, NULL, 0);
	if (IS_ERR(pdev))
		return PTR_ERR(pdev);

	return 0;
	return PTR_ERR_OR_ZERO(pdev);
}

static int olpc_xo1_ec_probe(struct platform_device *pdev)