Commit 09652b00 authored by Adrian-Leonard Radu's avatar Adrian-Leonard Radu Committed by Michael Ellerman

powerpc: Use PTR_RET instead of IS_ERR/PTR_ERR

Signed-off-by: default avatarAdrian-Leonard Radu <ady8radu@gmail.com>
Acked-by: default avatarGeoff Levand <geoff@infradead.org>
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
parent db38f290
...@@ -102,7 +102,7 @@ static int __init fail_iommu_debugfs(void) ...@@ -102,7 +102,7 @@ static int __init fail_iommu_debugfs(void)
struct dentry *dir = fault_create_debugfs_attr("fail_iommu", struct dentry *dir = fault_create_debugfs_attr("fail_iommu",
NULL, &fail_iommu); NULL, &fail_iommu);
return IS_ERR(dir) ? PTR_ERR(dir) : 0; return PTR_RET(dir);
} }
late_initcall(fail_iommu_debugfs); late_initcall(fail_iommu_debugfs);
......
...@@ -1049,10 +1049,8 @@ static int __init rtc_init(void) ...@@ -1049,10 +1049,8 @@ static int __init rtc_init(void)
return -ENODEV; return -ENODEV;
pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0); pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
return 0; return PTR_RET(pdev);
} }
module_init(rtc_init); module_init(rtc_init);
...@@ -89,10 +89,8 @@ static int __init ps3_rtc_init(void) ...@@ -89,10 +89,8 @@ static int __init ps3_rtc_init(void)
return -ENODEV; return -ENODEV;
pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0); pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
return 0; return PTR_RET(pdev);
} }
module_init(ps3_rtc_init); module_init(ps3_rtc_init);
...@@ -62,10 +62,7 @@ static int __init add_rtc(void) ...@@ -62,10 +62,7 @@ static int __init add_rtc(void)
pd = platform_device_register_simple("rtc_cmos", -1, pd = platform_device_register_simple("rtc_cmos", -1,
&res[0], num_res); &res[0], num_res);
if (IS_ERR(pd)) return PTR_RET(pd);
return PTR_ERR(pd);
return 0;
} }
fs_initcall(add_rtc); fs_initcall(add_rtc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment