diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-07-31 12:08:06 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-08-02 08:25:40 -0400 |
commit | c7ba9f7cb55926605983187a68624999b93abb94 (patch) | |
tree | 0fc54904e1d274d8b15b70defd99b320fd5a2a00 | |
parent | 24cfd8ca1d28331b9dad3b88d1958c976b2cfab6 (diff) |
x86/platform/olpc: Use PTR_ERR_OR_ZERO()
Replace the open coded equivalent with PTR_ERR_OR_ZERO().
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/1533053286-34990-1-git-send-email-zhongjiang@huawei.com
-rw-r--r-- | arch/x86/platform/olpc/olpc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/platform/olpc/olpc.c b/arch/x86/platform/olpc/olpc.c index 7c3077e58fa0..f0e920fb98ad 100644 --- a/arch/x86/platform/olpc/olpc.c +++ b/arch/x86/platform/olpc/olpc.c | |||
@@ -311,10 +311,8 @@ static int __init add_xo1_platform_devices(void) | |||
311 | return PTR_ERR(pdev); | 311 | return PTR_ERR(pdev); |
312 | 312 | ||
313 | pdev = platform_device_register_simple("olpc-xo1", -1, NULL, 0); | 313 | pdev = platform_device_register_simple("olpc-xo1", -1, NULL, 0); |
314 | if (IS_ERR(pdev)) | ||
315 | return PTR_ERR(pdev); | ||
316 | 314 | ||
317 | return 0; | 315 | return PTR_ERR_OR_ZERO(pdev); |
318 | } | 316 | } |
319 | 317 | ||
320 | static int olpc_xo1_ec_probe(struct platform_device *pdev) | 318 | static int olpc_xo1_ec_probe(struct platform_device *pdev) |