summaryrefslogtreecommitdiff
path: root/fs/jfs/xattr.c
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-05-09 10:47:14 -0500
committerDave Kleikamp <shaggy@austin.ibm.com>2005-05-09 10:47:14 -0500
commit259692bd5a2b2c2d351dd90748ba4126bc2a21b9 (patch)
treefa35d57768a76bbd88fa54b33daf922e9415f9da /fs/jfs/xattr.c
parent6f817abc643ec84cf07c99f964d04976212e1fd3 (diff)
downloadlinux-riscv-259692bd5a2b2c2d351dd90748ba4126bc2a21b9.tar.gz
linux-riscv-259692bd5a2b2c2d351dd90748ba4126bc2a21b9.tar.bz2
linux-riscv-259692bd5a2b2c2d351dd90748ba4126bc2a21b9.zip
JFS: Remove redundant kfree() NULL pointer checks
kfree() can handle a NULL pointer, don't worry about passing it one. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs/jfs/xattr.c')
-rw-r--r--fs/jfs/xattr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
index 7a9ffd5d03dc..6016373701a3 100644
--- a/fs/jfs/xattr.c
+++ b/fs/jfs/xattr.c
@@ -946,8 +946,7 @@ int __jfs_setxattr(struct inode *inode, const char *name, const void *value,
out:
up_write(&JFS_IP(inode)->xattr_sem);
- if (os2name)
- kfree(os2name);
+ kfree(os2name);
return rc;
}
@@ -1042,8 +1041,7 @@ ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data,
out:
up_read(&JFS_IP(inode)->xattr_sem);
- if (os2name)
- kfree(os2name);
+ kfree(os2name);
return size;
}