spufs: make register_filesystem the last potential failure exit
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 17 Mar 2012 05:37:51 +0000 (01:37 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 21 Mar 2012 01:29:44 +0000 (21:29 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/platforms/cell/spufs/inode.c

index 17b3211e36418a4c72af1b990b68c69be095f74b..4a3d90e0d426b96cd28359f63031dd407f40c2eb 100644 (file)
@@ -828,19 +828,19 @@ static int __init spufs_init(void)
        ret = spu_sched_init();
        if (ret)
                goto out_cache;
-       ret = register_filesystem(&spufs_type);
+       ret = register_spu_syscalls(&spufs_calls);
        if (ret)
                goto out_sched;
-       ret = register_spu_syscalls(&spufs_calls);
+       ret = register_filesystem(&spufs_type);
        if (ret)
-               goto out_fs;
+               goto out_syscalls;
 
        spufs_init_isolated_loader();
 
        return 0;
 
-out_fs:
-       unregister_filesystem(&spufs_type);
+out_syscalls:
+       unregister_spu_syscalls(&spufs_calls);
 out_sched:
        spu_sched_exit();
 out_cache: