From: Ian Abbott <abbotti@mev.co.uk>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Devendra Naga <devendra.aaru@gmail.com>,
Ian Abbott <ian.abbott@mev.co.uk>,
Mori Hess <fmhess@users.sourceforge.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 2/2] staging/comedi/drivers: free allocated priv and release resources if comedi_alloc_subdevices
Date: Mon, 2 Jul 2012 09:54:20 +0100 [thread overview]
Message-ID: <4FF161BC.8010104@mev.co.uk> (raw)
In-Reply-To: <20120701153218.GB4462@mwanda>
On 2012-07-01 16:32, Dan Carpenter wrote:
> On Sun, Jul 01, 2012 at 07:12:07PM +0530, Devendra Naga wrote:
>> as comedi_alloc_subdevices may fail, we leak out the memory allocated by alloc_private,
>> and also the I/O regions we requested.
>>
>> free out the private data pointer of the driver, and release the I/O regions.
>>
>> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
>
> This breaks the build.
>
> Also Hartley and Ian, what's the point of alloc_private()? It's
> just hiding stuff which we need to know about and use later on
> anyway.
Granted, it was more useful before we got kzalloc()!
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
prev parent reply other threads:[~2012-07-02 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-01 13:42 [PATCH V2 2/2] staging/comedi/drivers: free allocated priv and release resources if comedi_alloc_subdevices Devendra Naga
2012-07-01 15:32 ` Dan Carpenter
2012-07-01 16:06 ` devendra.aaru
2012-07-01 16:08 ` devendra.aaru
2012-07-02 8:54 ` Ian Abbott [this message]
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=4FF161BC.8010104@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=devendra.aaru@gmail.com \
--cc=fmhess@users.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=ian.abbott@mev.co.uk \
--cc=linux-kernel@vger.kernel.org \
/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.