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

From: Dan Carpenter
Date: Sun Jul 01 2012 - 11:32:32 EST


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.

regards,
dan carpenter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/