fs/jffs2/xattr.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=086f2f76f498837283433b2b3b76125dc15328fc
Commit: 086f2f76f498837283433b2b3b76125dc15328fc
Parent: b6861d0a15d6628a5b161f014c542d03577e4c26
Author: Fabian Frederick <fabf at skynet.be>
AuthorDate: Mon Jun 16 20:02:49 2014 +0200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Jul 2 15:25:44 2014 -0700
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 <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/xattr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index ad0f2e2..d72817a 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);
}
}
More information about the linux-mtd-cvs
mailing list