mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-02 00:40:59 -05:00
hostfs: code cleanups
Some code cleanups for hostfs. Signed-off-by: Richard Weinberger <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
be76d81f99
commit
c5c6dd4e2d
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue