diff mbox

jffs2: remove unneeded kfree.

Message ID 55239023.5000107@huawei.com
State Superseded
Headers show

Commit Message

fangwei April 7, 2015, 8:06 a.m. UTC
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>
---
 fs/jffs2/wbuf.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Brian Norris July 6, 2015, 10:23 p.m. UTC | #1
On Tue, Apr 07, 2015 at 04:06:59PM +0800, fangwei wrote:
> 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>
> ---
>  fs/jffs2/wbuf.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
> index 09ed551..63f31c0 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;
>         }

Your patches are whitespace damaged and cannot be applied. Please fix
your mailer and resend. Consider retesting by sending to yourself and
try using git-am. If all else fails, git-send-email is your friend.

Thanks,
Brian
fangwei July 7, 2015, 1:43 a.m. UTC | #2
Hi Brian,

Sorry, my bad, I configed my editor with expandtab. I'll
fix it and test it in my end, then resend it.

Thanks,
Wei

On 2015/7/7 6:23, Brian Norris wrote:
> On Tue, Apr 07, 2015 at 04:06:59PM +0800, fangwei wrote:
>> 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>
>> ---
>>  fs/jffs2/wbuf.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
>> index 09ed551..63f31c0 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;
>>         }
> 
> Your patches are whitespace damaged and cannot be applied. Please fix
> your mailer and resend. Consider retesting by sending to yourself and
> try using git-am. If all else fails, git-send-email is your friend.
> 
> Thanks,
> Brian
> 
>
diff mbox

Patch

diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 09ed551..63f31c0 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;
        }