summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
authorJesper Juhl2011-06-13 22:16:44 +0200
committerArtem Bityutskiy2011-09-11 14:02:10 +0200
commite8a0e41266e9c207ad8ac158cee9547ef1bc90ac (patch)
treebe7ccbe744f5a71b6de19ed31e1ce31162d1c51c /fs/jffs2/scan.c
parentmtd: onenand: remove redundant mtd_device_unregister before onenand_release (diff)
downloadkernel-qcow2-linux-e8a0e41266e9c207ad8ac158cee9547ef1bc90ac.tar.gz
kernel-qcow2-linux-e8a0e41266e9c207ad8ac158cee9547ef1bc90ac.tar.xz
kernel-qcow2-linux-e8a0e41266e9c207ad8ac158cee9547ef1bc90ac.zip
jffs2: Avoid unneeded 'if' before kfree
kfree() deals gracefully with NULL pointers, so it's pointless to test for one prior to calling it. This removes such a test from jffs2_scan_medium(). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r--fs/jffs2/scan.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 8d8cd3419d02..28107ca136e4 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -275,9 +275,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
else
c->mtd->unpoint(c->mtd, 0, c->mtd->size);
#endif
- if (s)
- kfree(s);
-
+ kfree(s);
return ret;
}