fs/jffs2/acl.c: remove null test before kfree

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Aug 8 09:59:01 PDT 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b6861d0a15d6628a5b161f014c542d03577e4c26
Commit:     b6861d0a15d6628a5b161f014c542d03577e4c26
Parent:     da90c4ecbc680881741b51c78a51a3b52d142116
Author:     Fabian Frederick <fabf at skynet.be>
AuthorDate: Mon Jun 16 19:58:07 2014 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Jul 2 15:25:39 2014 -0700

    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 <dwmw2 at infradead.org>
    Cc: linux-mtd at lists.infradead.org
    Signed-off-by: Fabian Frederick <fabf at skynet.be>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 fs/jffs2/acl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 009ec0b..2f7a3c0 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;



More information about the linux-mtd-cvs mailing list