From: Dan Carpenter <dan.carpenter@oracle.com>
To: walter harms <wharms@bfs.de>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>,
"Ed L. Cashin" <ecashin@coraid.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/9] drivers/block/aoe/aoecmd.c: Remove useless kfree
Date: Thu, 13 Sep 2012 14:42:05 +0000 [thread overview]
Message-ID: <20120913144205.GN19396@mwanda> (raw)
In-Reply-To: <5051E9F3.4020708@bfs.de>
On Thu, Sep 13, 2012 at 04:13:07PM +0200, walter harms wrote:
> > diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
> > index 5461faa..cbb0521 100644
> > --- a/drivers/block/aoe/aoecmd.c
> > +++ b/drivers/block/aoe/aoecmd.c
> > @@ -1257,7 +1257,6 @@ addtgt(struct aoedev *d, char *addr, ulong nframes)
> > }
> > t = kcalloc(1, sizeof *t, GFP_ATOMIC);
> > if (!t) {
> > - kfree(t);
> > printk(KERN_INFO "aoe: cannot allocate memory to add target\n");
> > return NULL;
> > }
> >
>
>
> this should read kzalloc(sizeof (*t), GFP_ATOMIC);
> see: [PATCH 3/9] drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: Remove useless kfree
I already fixed this one last week actually. I did it the way
Walter suggests.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: walter harms <wharms@bfs.de>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>,
"Ed L. Cashin" <ecashin@coraid.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/9] drivers/block/aoe/aoecmd.c: Remove useless kfree
Date: Thu, 13 Sep 2012 17:42:05 +0300 [thread overview]
Message-ID: <20120913144205.GN19396@mwanda> (raw)
In-Reply-To: <5051E9F3.4020708@bfs.de>
On Thu, Sep 13, 2012 at 04:13:07PM +0200, walter harms wrote:
> > diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
> > index 5461faa..cbb0521 100644
> > --- a/drivers/block/aoe/aoecmd.c
> > +++ b/drivers/block/aoe/aoecmd.c
> > @@ -1257,7 +1257,6 @@ addtgt(struct aoedev *d, char *addr, ulong nframes)
> > }
> > t = kcalloc(1, sizeof *t, GFP_ATOMIC);
> > if (!t) {
> > - kfree(t);
> > printk(KERN_INFO "aoe: cannot allocate memory to add target\n");
> > return NULL;
> > }
> >
>
>
> this should read kzalloc(sizeof (*t), GFP_ATOMIC);
> see: [PATCH 3/9] drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: Remove useless kfree
I already fixed this one last week actually. I did it the way
Walter suggests.
regards,
dan carpenter
next prev parent reply other threads:[~2012-09-13 14:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 15:06 [PATCH 1/9] drivers/block/aoe/aoecmd.c: Remove useless kfree Peter Senna Tschudin
2012-09-12 15:06 ` Peter Senna Tschudin
2012-09-13 1:41 ` Ed Cashin
2012-09-13 1:41 ` Ed Cashin
2012-09-13 14:13 ` walter harms
2012-09-13 14:13 ` walter harms
2012-09-13 14:42 ` Dan Carpenter [this message]
2012-09-13 14:42 ` Dan Carpenter
2012-09-14 7:42 ` Peter Senna Tschudin
2012-09-14 7:42 ` Peter Senna Tschudin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120913144205.GN19396@mwanda \
--to=dan.carpenter@oracle.com \
--cc=ecashin@coraid.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=wharms@bfs.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.