diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-06-13 16:16:44 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:10 -0400 |
commit | e8a0e41266e9c207ad8ac158cee9547ef1bc90ac (patch) | |
tree | be7ccbe744f5a71b6de19ed31e1ce31162d1c51c /fs/jffs2 | |
parent | e638275e18a929103bb087acb94d2b67eb0818e0 (diff) |
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')
-rw-r--r-- | fs/jffs2/scan.c | 4 |
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) | |||
275 | else | 275 | else |
276 | c->mtd->unpoint(c->mtd, 0, c->mtd->size); | 276 | c->mtd->unpoint(c->mtd, 0, c->mtd->size); |
277 | #endif | 277 | #endif |
278 | if (s) | 278 | kfree(s); |
279 | kfree(s); | ||
280 | |||
281 | return ret; | 279 | return ret; |
282 | } | 280 | } |
283 | 281 | ||