From: fangwei Date: Tue, 7 Jul 2015 02:54:26 +0000 (+0800) Subject: jffs2: remove unneeded kfree X-Git-Tag: firefly_0821_release~176^2~766^2~141 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=16c863bbf4dabc1ff67d5c67d2d6e614211528d4;p=firefly-linux-kernel-4.4.55.git jffs2: remove unneeded kfree c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so there is no need to free it. Signed-off-by: Wei Fang Signed-off-by: Brian Norris --- diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 09ed55190ee2..63f31c0733c5 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) { #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL); if (!c->wbuf_verify) { - kfree(c->oobbuf); kfree(c->wbuf); return -ENOMEM; }