diff options
author | Tiezhu Yang | 2016-06-28 07:27:59 +0800 |
---|---|---|
committer | Jaegeuk Kim | 2016-07-08 10:33:27 -0700 |
commit | a0995af69554cecd55c8d2b8c4e4418b84737fd0 (patch) | |
tree | 8de196fe9a2ed778d4792a4ec3430f0d8ee0c604 /fs/f2fs/xattr.c | |
parent | 64058be9c8e3579d7055e0b01d2bd9b294db3998 (diff) |
f2fs: remove unnecessary goto statement
When base_addr is NULL, there is no need to call kzfree,
it should return -ENOMEM directly. Additionally, it is
better to initialize variable 'error' with 0.
Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/xattr.c')
-rw-r--r-- | fs/f2fs/xattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 8c0a3b36a917..2e8cb873c31e 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -447,7 +447,7 @@ static int __f2fs_setxattr(struct inode *inode, int index, int found, newsize; size_t len; __u32 new_hsize; - int error = -ENOMEM; + int error = 0; if (name == NULL) return -EINVAL; @@ -465,7 +465,7 @@ static int __f2fs_setxattr(struct inode *inode, int index, base_addr = read_all_xattrs(inode, ipage); if (!base_addr) - goto exit; + return -ENOMEM; /* find entry with wanted name. */ here = __find_xattr(base_addr, index, len, name); |