[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in fs/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 5b2a835..1a96903 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -490,7 +490,7 @@
up(&f->sem);
jffs2_do_clear_inode(c, f);
}
- kfree (f);
+ kfree(f);
return ret;
}
@@ -742,10 +742,8 @@
/* For symlink inodes we us f->dents to store the target path name */
if (S_ISLNK(OFNI_EDONI_2SFFJ(f)->i_mode)) {
- if (f->dents) {
- kfree(f->dents);
- f->dents = NULL;
- }
+ kfree(f->dents);
+ f->dents = NULL;
} else {
fds = f->dents;