powerpc: Use PTR_RET instead of IS_ERR/PTR_ERR
authorAdrian-Leonard Radu <ady8radu@gmail.com>
Sun, 10 Mar 2013 03:07:00 +0000 (03:07 +0000)
committerMichael Ellerman <michael@ellerman.id.au>
Thu, 18 Apr 2013 03:03:48 +0000 (13:03 +1000)
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>
arch/powerpc/kernel/iommu.c
arch/powerpc/kernel/time.c
arch/powerpc/platforms/ps3/time.c
arch/powerpc/sysdev/rtc_cmos_setup.c

index 31c4fdc6859cbfc4ec4d6f03f55f5a7deac748fb..c0d0dbddfba1bfa2a6113b36b266f83bf3816e71 100644 (file)
@@ -102,7 +102,7 @@ static int __init fail_iommu_debugfs(void)
        struct dentry *dir = fault_create_debugfs_attr("fail_iommu",
                                                       NULL, &fail_iommu);
 
-       return IS_ERR(dir) ? PTR_ERR(dir) : 0;
+       return PTR_RET(dir);
 }
 late_initcall(fail_iommu_debugfs);
 
index f77fa22754bcde0d9024f5365e1fa8ac7885a3a6..5fc29ad7e26fad673cd1d6732d9f6fd5586a42c7 100644 (file)
@@ -1049,10 +1049,8 @@ static int __init rtc_init(void)
                return -ENODEV;
 
        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);
index 40b5cb433005f615381d205e3d281dbd5b1377f4..cba1e6be68e505b8482dbd41afc70039c7949b96 100644 (file)
@@ -89,10 +89,8 @@ static int __init ps3_rtc_init(void)
                return -ENODEV;
 
        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);
index 9afba924e94f92154da751671b1115ade6413321..af79e1ea74b6dcb061b89d2032770914332ff1da 100644 (file)
@@ -62,10 +62,7 @@ static int  __init add_rtc(void)
        pd = platform_device_register_simple("rtc_cmos", -1,
                                             &res[0], num_res);
 
-       if (IS_ERR(pd))
-               return PTR_ERR(pd);
-
-       return 0;
+       return PTR_RET(pd);
 }
 fs_initcall(add_rtc);