All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/jffs2/xattr.c:  remove null test before kfree
@ 2014-06-16 18:02 ` Fabian Frederick
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Frederick @ 2014-06-16 18:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, David Woodhouse, linux-mtd

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/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


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

* [PATCH 1/1] fs/jffs2/xattr.c:  remove null test before kfree
@ 2014-06-16 18:02 ` Fabian Frederick
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Frederick @ 2014-06-16 18:02 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/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

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

* Re: [PATCH 1/1] fs/jffs2/xattr.c:  remove null test before kfree
  2014-06-16 18:02 ` Fabian Frederick
@ 2014-07-03  0:38   ` Brian Norris
  -1 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2014-07-03  0:38 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, linux-mtd, David Woodhouse

On Mon, Jun 16, 2014 at 08:02:49PM +0200, Fabian Frederick wrote:
> 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>

Pushed to l2-mtd.git. Thanks!

Brian

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

* Re: [PATCH 1/1] fs/jffs2/xattr.c:  remove null test before kfree
@ 2014-07-03  0:38   ` Brian Norris
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2014-07-03  0:38 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: David Woodhouse, linux-mtd, linux-kernel

On Mon, Jun 16, 2014 at 08:02:49PM +0200, Fabian Frederick wrote:
> 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>

Pushed to l2-mtd.git. Thanks!

Brian

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

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

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.