From: Jesper Juhl Date: Mon, 13 Jun 2011 20:16:44 +0000 (+0200) Subject: jffs2: Avoid unneeded 'if' before kfree X-Git-Tag: next-20110818~40^2~58 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0870c8f22cd3d8225154a8c7fd2080e803c5c390;p=karo-tx-linux.git 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 Signed-off-by: Artem Bityutskiy --- 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; }