]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
m68k: 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:16:00 +0000 (15:16 +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/kernel/time.c

index 707f0573ec6bfade21e43c7a91bd0b3896ed8d79..5d0bcaad2e552f5d9587911b241bfe2369eb855e 100644 (file)
@@ -100,10 +100,7 @@ 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);