提交 e8a0e412 编写于 作者: J Jesper Juhl 提交者: Artem Bityutskiy

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: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NArtem Bityutskiy <dedekind1@gmail.com>
上级 e638275e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册