projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24cfd8c
)
x86/platform/olpc: Use PTR_ERR_OR_ZERO()
author
zhong jiang
<zhongjiang@huawei.com>
Tue, 31 Jul 2018 16:08:06 +0000
(
00:08
+0800)
committer
Thomas Gleixner
<tglx@linutronix.de>
Thu, 2 Aug 2018 12:25:40 +0000
(14:25 +0200)
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
arch/x86/platform/olpc/olpc.c
patch
|
blob
|
history
diff --git
a/arch/x86/platform/olpc/olpc.c
b/arch/x86/platform/olpc/olpc.c
index 7c3077e58fa02f340e21f901ea0315716574ac62..f0e920fb98ad01f8657fd58c519e00a54f09bc99 100644
(file)
--- 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)
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)