Discussion:
[PATCH] get rid of redundant checks for NULL before kfree() in fs/jffs/
Jesper Juhl
2005-03-25 22:18:16 UTC
Permalink
There's no need to check for NULL before calling kfree().

Signed-off-by: Jesper Juhl <juhl-***@dif.dk>

--- linux-2.6.12-rc1-mm3-orig/fs/jffs/intrep.c 2005-03-21 23:12:41.000000000 +0100
+++ linux-2.6.12-rc1-mm3/fs/jffs/intrep.c 2005-03-25 22:47:29.000000000 +0100
@@ -1693,9 +1693,7 @@ jffs_find_child(struct jffs_file *dir, c
}
printk("jffs_find_child(): Didn't find the file \"%s\".\n",
(copy ? copy : ""));
- if (copy) {
- kfree(copy);
- }
+ kfree(copy);
});

return f;

Loading...