Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/jffs2/acl.c: remove null test before kfree
@ 2014-06-16 17:58 Fabian Frederick
  2014-07-03  0:38 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-06-16 17:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, linux-mtd, David Woodhouse

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

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 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;
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-03  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 17:58 [PATCH 1/1] fs/jffs2/acl.c: remove null test before kfree Fabian Frederick
2014-07-03  0:38 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox