[PATCH 1/1] fs/jffs2/xattr.c: remove null test before kfree

From: Fabian Frederick
Date: Mon Jun 16 2014 - 14:04:32 EST


Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: linux-mtd@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
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);
}
}
--
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/