diff options
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 423596a6b9..5d09c2e8f3 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -661,25 +661,29 @@ static int __init spufs_init(void) | |||
661 | 661 | ||
662 | if (!spufs_inode_cache) | 662 | if (!spufs_inode_cache) |
663 | goto out; | 663 | goto out; |
664 | if (spu_sched_init() != 0) { | 664 | ret = spu_sched_init(); |
665 | kmem_cache_destroy(spufs_inode_cache); | ||
666 | goto out; | ||
667 | } | ||
668 | ret = register_filesystem(&spufs_type); | ||
669 | if (ret) | 665 | if (ret) |
670 | goto out_cache; | 666 | goto out_cache; |
667 | ret = register_filesystem(&spufs_type); | ||
668 | if (ret) | ||
669 | goto out_sched; | ||
671 | ret = register_spu_syscalls(&spufs_calls); | 670 | ret = register_spu_syscalls(&spufs_calls); |
672 | if (ret) | 671 | if (ret) |
673 | goto out_fs; | 672 | goto out_fs; |
674 | ret = register_arch_coredump_calls(&spufs_coredump_calls); | 673 | ret = register_arch_coredump_calls(&spufs_coredump_calls); |
675 | if (ret) | 674 | if (ret) |
676 | goto out_fs; | 675 | goto out_syscalls; |
677 | 676 | ||
678 | spufs_init_isolated_loader(); | 677 | spufs_init_isolated_loader(); |
679 | 678 | ||
680 | return 0; | 679 | return 0; |
680 | |||
681 | out_syscalls: | ||
682 | unregister_spu_syscalls(&spufs_calls); | ||
681 | out_fs: | 683 | out_fs: |
682 | unregister_filesystem(&spufs_type); | 684 | unregister_filesystem(&spufs_type); |
685 | out_sched: | ||
686 | spu_sched_exit(); | ||
683 | out_cache: | 687 | out_cache: |
684 | kmem_cache_destroy(spufs_inode_cache); | 688 | kmem_cache_destroy(spufs_inode_cache); |
685 | out: | 689 | out: |