Skip to content

Commit 09652b0

Browse files
adyradumpe
authored andcommitted
powerpc: Use PTR_RET instead of IS_ERR/PTR_ERR
Signed-off-by: Adrian-Leonard Radu <ady8radu@gmail.com> Acked-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
1 parent db38f29 commit 09652b0

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

‎arch/powerpc/kernel/iommu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int __init fail_iommu_debugfs(void)
102102
struct dentry *dir = fault_create_debugfs_attr("fail_iommu",
103103
NULL, &fail_iommu);
104104

105-
return IS_ERR(dir) ? PTR_ERR(dir) : 0;
105+
return PTR_RET(dir);
106106
}
107107
late_initcall(fail_iommu_debugfs);
108108

‎arch/powerpc/kernel/time.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,10 +1049,8 @@ static int __init rtc_init(void)
10491049
return -ENODEV;
10501050

10511051
pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
1052-
if (IS_ERR(pdev))
1053-
return PTR_ERR(pdev);
10541052

1055-
return 0;
1053+
return PTR_RET(pdev);
10561054
}
10571055

10581056
module_init(rtc_init);

‎arch/powerpc/platforms/ps3/time.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,8 @@ static int __init ps3_rtc_init(void)
8989
return -ENODEV;
9090

9191
pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
92-
if (IS_ERR(pdev))
93-
return PTR_ERR(pdev);
9492

95-
return 0;
93+
return PTR_RET(pdev);
9694
}
9795

9896
module_init(ps3_rtc_init);

‎arch/powerpc/sysdev/rtc_cmos_setup.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ static int __init add_rtc(void)
6262
pd = platform_device_register_simple("rtc_cmos", -1,
6363
&res[0], num_res);
6464

65-
if (IS_ERR(pd))
66-
return PTR_ERR(pd);
67-
68-
return 0;
65+
return PTR_RET(pd);
6966
}
7067
fs_initcall(add_rtc);
7168

0 commit comments

Comments
 (0)