]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc-avoid-calling-platform_device_put-twice-in-test_init-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 29 Nov 2012 03:18:44 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:39 +0000 (16:23 +1100)
improve label naming

Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-test.c

index 209a127230389202454d2e2c8a85cda6cba0e0af..974b9ae252ab5f116d9fa6faa21d587029a3f18a 100644 (file)
@@ -152,24 +152,24 @@ static int __init test_init(void)
 
        if ((test1 = platform_device_alloc("rtc-test", 1)) == NULL) {
                err = -ENOMEM;
-               goto exit_free_test0;
+               goto exit_put_test0;
        }
 
        if ((err = platform_device_add(test0)))
-               goto exit_free_test1;
+               goto exit_put_test1;
 
        if ((err = platform_device_add(test1)))
-               goto exit_device_unregister;
+               goto exit_del_test0;
 
        return 0;
 
-exit_device_unregister:
+exit_del_test0:
        platform_device_del(test0);
 
-exit_free_test1:
+exit_put_test1:
        platform_device_put(test1);
 
-exit_free_test0:
+exit_put_test0:
        platform_device_put(test0);
 
 exit_driver_unregister: