Skip to content

Commit c5c6dd4

Browse files
richardweinbergertorvalds
authored andcommitted
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>
1 parent be76d81 commit c5c6dd4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎fs/hostfs/hostfs_user.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ void *open_dir(char *path, int *err_out)
9494

9595
dir = opendir(path);
9696
*err_out = errno;
97-
if (dir == NULL)
98-
return NULL;
97+
9998
return dir;
10099
}
101100

@@ -205,7 +204,7 @@ int set_attr(const char *file, struct hostfs_iattr *attrs, int fd)
205204
if (attrs->ia_valid & HOSTFS_ATTR_MODE) {
206205
if (fd >= 0) {
207206
if (fchmod(fd, attrs->ia_mode) != 0)
208-
return (-errno);
207+
return -errno;
209208
} else if (chmod(file, attrs->ia_mode) != 0) {
210209
return -errno;
211210
}

0 commit comments

Comments
 (0)