Re: [PATCH 2/3] Input: wm831x-ts - Convert to devm_kzalloc()

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

 



On Thu, Oct 11, 2012 at 05:07:24PM +0900, Mark Brown wrote:
> On Thu, Oct 11, 2012 at 12:39:55AM -0700, Dmitry Torokhov wrote:
> > On Wed, Oct 10, 2012 at 10:20:35PM +0900, Mark Brown wrote:
> > > Saves a little code and eliminates the possibility of introducing some
> > > leaks.
> 
> > *sigh* OK, I guess devm_* is here to stay and I have to get on with the
> > program. I am still unhappy that half of the patches converting/using
> > devm_* APIs are wrong (not these ones), but I will apply these 3.
> 
> What's the error pattern you're seeing?  I've not noticed much of an
> issue here, but if there is one perhaps we can do something to make the
> error more obvious or harder to introduce.

int driver_probe()
{
	devm_kzalloc();
	input_allocate_device();
	...
	devm_request_irq();
	...
	input_register_device();
....
}

void driver_remove()
{
	input_unregister_device();
	/* rely on deves for cleanup */
}

The problem is that input device is freed but interrupts are still fully
functional.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux