From: Richard Weinberger Date: Tue, 26 Oct 2010 21:22:20 +0000 (-0700) Subject: hostfs: code cleanups X-Git-Tag: v2.6.37-rc1~105^2~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5c6dd4e2dce3cb4d705d97183bc42b4e33e2606;p=platform%2Fkernel%2Flinux-3.10.git hostfs: code cleanups Some code cleanups for hostfs. Signed-off-by: Richard Weinberger Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c index 8d02683..d51a9838 100644 --- a/fs/hostfs/hostfs_user.c +++ b/fs/hostfs/hostfs_user.c @@ -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; }