jffs2: remove unneeded kfree
authorfangwei <fangwei1@huawei.com>
Tue, 7 Jul 2015 02:54:26 +0000 (10:54 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 29 Sep 2015 01:41:07 +0000 (18:41 -0700)
c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
there is no need to free it.

Signed-off-by: Wei Fang <fangwei1@huawei.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
fs/jffs2/wbuf.c

index 09ed55190ee2c077524e38a11b4fe41c00f51ac9..63f31c0733c51e5e1e8cc0b51425dc07bb59cc3e 100644 (file)
@@ -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;
        }