Re: [PATCH V2 2/2] staging/comedi/drivers: free allocated priv and release resources if comedi_alloc_subdevices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux