From b6861d0a15d6628a5b161f014c542d03577e4c26 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Mon, 16 Jun 2014 19:58:07 +0200 Subject: fs/jffs2/acl.c: remove null test before kfree Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Signed-off-by: Fabian Frederick Signed-off-by: Brian Norris --- fs/jffs2/acl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/jffs2') diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 009ec0b5993d..2f7a3c090489 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -202,8 +202,7 @@ struct posix_acl *jffs2_get_acl(struct inode *inode, int type) } else { acl = ERR_PTR(rc); } - if (value) - kfree(value); + kfree(value); if (!IS_ERR(acl)) set_cached_acl(inode, type, acl); return acl; -- cgit v1.2.3 From 086f2f76f498837283433b2b3b76125dc15328fc Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Mon, 16 Jun 2014 20:02:49 +0200 Subject: fs/jffs2/xattr.c: remove null test before kfree Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Signed-off-by: Fabian Frederick Signed-off-by: Brian Norris --- fs/jffs2/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/jffs2') diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index ad0f2e2a1700..d72817ac51f6 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c @@ -756,8 +756,7 @@ void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c) for (i=0; i < XATTRINDEX_HASHSIZE; i++) { list_for_each_entry_safe(xd, _xd, &c->xattrindex[i], xindex) { list_del(&xd->xindex); - if (xd->xname) - kfree(xd->xname); + kfree(xd->xname); jffs2_free_xattr_datum(xd); } } -- cgit v1.2.3