jffs2: remove unneeded kfree
PATCH 1/1 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 <[email protected]>
--- fs/jffs2/wbuf.c | 1 - 1 file changed, 1 deletion(-)
fs/jffs2/wbuf.c +0 -1
@@ -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 ; }
-- 1.8.3.1
Quoted 13 lines · Wei Fang
c->oobbufhasn't been kmalloced injffs2_dataflash_setup, so there is no need to free it.Signed-off-by Wei Fang <[email protected]>--- fs/jffs2/wbuf.c | 1 - 1 file changed, 1 deletion(-)fs/jffs2/wbuf.c +0
-0
fs/jffs2/wbuf.c int jffs2_dataflash_setup(struct jffs2_sb_info *c) { · line 1279
Quoted 7 lines
fs/jffs2/wbuf.c +0
-1@@ -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 ; }
I just realized I responded to your email from months ago. But I see you sent the same patch here. Both are similarly whitespace damaged. Please fix and test on your end before resending again.
Thanks,
Brian