]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Rearrange error handling in fs_pipe.c a bit
authorRusty Russell <trivial@rustcorp.com.au>
Sun, 5 Oct 2003 04:29:54 +0000 (21:29 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 5 Oct 2003 04:29:54 +0000 (21:29 -0700)
From:  Scharfe <l.s.r@web.de>

  clean up the error handling in pipefs a little bit,
  shrinking pipe.o by whopping 4 bytes! :)

fs/pipe.c

index 5ff6f6ee798a3f6a9f8fa4f8d980699f6f222971..e75a087c84da30f3b3534d310c72b25e756a9e3c 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -641,11 +641,10 @@ static int __init init_pipe_fs(void)
        int err = register_filesystem(&pipe_fs_type);
        if (!err) {
                pipe_mnt = kern_mount(&pipe_fs_type);
-               err = PTR_ERR(pipe_mnt);
-               if (IS_ERR(pipe_mnt))
+               if (IS_ERR(pipe_mnt)) {
+                       err = PTR_ERR(pipe_mnt);
                        unregister_filesystem(&pipe_fs_type);
-               else
-                       err = 0;
+               }
        }
        return err;
 }