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>
This commit is contained in:
committed by
Dave Kleikamp
parent
6f817abc64
commit
259692bd5a
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user