From da58688fb02100c1275d15213d01c06565933e14 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Fri, 12 Feb 2016 20:07:54 +0530 Subject: [PATCH] Staging: lustre: llite: Remove NULL check before kfree NULL check before kfree is unnecessary so remove it. Semantic patch used: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/llite/xattr.c | 9 ++++----- 1 file 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