hostfs: code cleanups
authorRichard Weinberger <richard@nod.at>
Tue, 26 Oct 2010 21:22:20 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 23:52:12 +0000 (16:52 -0700)
Some code cleanups for hostfs.

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hostfs/hostfs_user.c

index 8d02683585e0c80f60d0587c78768455f7db72b8..d51a98384bc03b0410f7ba3d5c021804511d10bf 100644 (file)
@@ -94,8 +94,7 @@ void *open_dir(char *path, int *err_out)
 
        dir = opendir(path);
        *err_out = errno;
-       if (dir == NULL)
-               return NULL;
+
        return dir;
 }
 
@@ -205,7 +204,7 @@ int set_attr(const char *file, struct hostfs_iattr *attrs, int fd)
        if (attrs->ia_valid & HOSTFS_ATTR_MODE) {
                if (fd >= 0) {
                        if (fchmod(fd, attrs->ia_mode) != 0)
-                               return (-errno);
+                               return -errno;
                } else if (chmod(file, attrs->ia_mode) != 0) {
                        return -errno;
                }