m68k/amiga: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
authorThomas Meyer <thomas@m3y3r.de>
Mon, 6 Aug 2012 17:51:16 +0000 (19:51 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Sat, 18 Aug 2012 13:15:57 +0000 (15:15 +0200)
The semantic patch that makes this change is available
in scripts/coccinelle/api/ptr_ret.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/amiga/platform.c

index 80076d368b7e8b4417c4612017fd4cbb824ab358..6083088c0cca8287f50888143fb18a95d71c0b5d 100644 (file)
@@ -56,10 +56,7 @@ static int __init amiga_init_bus(void)
        n = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2;
        pdev = platform_device_register_simple("amiga-zorro", -1,
                                               zorro_resources, n);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
-
-       return 0;
+       return PTR_RET(pdev);
 }
 
 subsys_initcall(amiga_init_bus);
This page took 0.025287 seconds and 5 git commands to generate.