summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-02-12 20:07:54 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 16:21:15 -0800
commitda58688fb02100c1275d15213d01c06565933e14 (patch)
tree1690157af0e89e6a84c03e8a4368d620d241bbca
parentacdd1b8e681405beeb1f73333947fd5a42b871e9 (diff)
downloadlinux-da58688fb02100c1275d15213d01c06565933e14.tar.bz2
Staging: lustre: llite: Remove NULL check before kfree
NULL check before kfree is unnecessary so remove it. Semantic patch used: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/llite/xattr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
index 8eb43f192d1f..fa477e76c7d7 100644
--- a/drivers/staging/lustre/lustre/llite/xattr.c
+++ b/drivers/staging/lustre/lustre/llite/xattr.c
@@ -192,11 +192,10 @@ int ll_setxattr_common(struct inode *inode, const char *name,
valid, name, pv, size, 0, flags,
ll_i2suppgid(inode), &req);
#ifdef CONFIG_FS_POSIX_ACL
- if (new_value != NULL)
- /*
- * Release the posix ACL space.
- */
- kfree(new_value);
+ /*
+ * Release the posix ACL space.
+ */
+ kfree(new_value);
if (acl != NULL)
lustre_ext_acl_xattr_free(acl);
#endif