summaryrefslogtreecommitdiffstats
path: root/fs/hostfs
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2010-10-26 14:22:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 16:52:12 -0700
commitc5c6dd4e2dce3cb4d705d97183bc42b4e33e2606 (patch)
tree44d3d1cb85a2d44c3160bff06ce0467d984b7f99 /fs/hostfs
parentbe76d81f99c4c120adcd201a7316e4dd7dbe3c11 (diff)
downloadop-kernel-dev-c5c6dd4e2dce3cb4d705d97183bc42b4e33e2606.zip
op-kernel-dev-c5c6dd4e2dce3cb4d705d97183bc42b4e33e2606.tar.gz
hostfs: code cleanups
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>
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs_user.c5
1 files changed, 2 insertions, 3 deletions
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;
}
OpenPOWER on IntegriCloud