ARM: OMAP2+: Cocci spatch "ptr_ret.spatch"
authorThomas Meyer <thomas@m3y3r.de>
Sat, 1 Jun 2013 09:44:44 +0000 (11:44 +0200)
committerTony Lindgren <tony@atomide.com>
Thu, 4 Jul 2013 12:10:51 +0000 (05:10 -0700)
Cocci spatch "ptr_ret.spatch"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/fb.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/pmu.c

index aef96e45cb2049c2cebba2ad50e1e8a0a8036225..c3bc58b88fa6e646512d2e5fb189e5d07ea15f5a 100644 (file)
@@ -66,7 +66,7 @@ static int __init omap3_l3_init(void)
 
        WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
 
-       return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
+       return PTR_RET(pdev);
 }
 omap_postcore_initcall(omap3_l3_init);
 
@@ -100,7 +100,7 @@ static int __init omap4_l3_init(void)
 
        WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
 
-       return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
+       return PTR_RET(pdev);
 }
 omap_postcore_initcall(omap4_l3_init);
 
index 190ae493c6efe97bf2465b93245df54106cdd02b..2ca33cc0c484055a7c4f6543b9c2a1e35adeef87 100644 (file)
@@ -83,10 +83,7 @@ static int __init omap_init_vrfb(void)
        pdev = platform_device_register_resndata(NULL, "omapvrfb", -1,
                        res, num_res, NULL, 0);
 
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
-       else
-               return 0;
+       return PTR_RET(pdev);
 }
 
 omap_arch_initcall(omap_init_vrfb);
index 1c7969e965d75685ca8cd0bba8c06feba47b51ab..f3fdd6afa2137c8bb85e088d40e1e6217bf6334d 100644 (file)
@@ -1734,7 +1734,7 @@ static int __init omap_gpmc_init(void)
        pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
        WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
 
-       return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
+       return PTR_RET(pdev);
 }
 omap_postcore_initcall(omap_gpmc_init);
 
index 9ace8eae7ee8b1444aa9b0634764d2ad93871ecb..33c8846b419358693c634cca1c6b860f99c8fa6f 100644 (file)
@@ -54,10 +54,7 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
        WARN(IS_ERR(omap_pmu_dev), "Can't build omap_device for %s.\n",
             dev_name);
 
-       if (IS_ERR(omap_pmu_dev))
-               return PTR_ERR(omap_pmu_dev);
-
-       return 0;
+       return PTR_RET(omap_pmu_dev);
 }
 
 static int __init omap_init_pmu(void)