Re: [PATCH] nvmem: core: Prevent memory leak when device is unregistered

2017-05-17 Thread Mika Westerberg
On Tue, May 16, 2017 at 02:33:55PM -0700, Andrey Smirnov wrote: > On Mon, May 15, 2017 at 4:13 AM, Mika Westerberg > wrote: > > The nvmem_unregister() calls device_del() for the device but forgets to > > call put_device() to actually release the device object which causes > > that memory to be lea

Re: [PATCH] nvmem: core: Prevent memory leak when device is unregistered

2017-05-16 Thread Andrey Smirnov
On Mon, May 15, 2017 at 4:13 AM, Mika Westerberg wrote: > The nvmem_unregister() calls device_del() for the device but forgets to > call put_device() to actually release the device object which causes > that memory to be leaked. > > Fix this by calling device_unregister() for the device intead whi

Re: [PATCH] nvmem: core: Prevent memory leak when device is unregistered

2017-05-16 Thread Johan Hovold
On Mon, May 15, 2017 at 02:13:23PM +0300, Mika Westerberg wrote: > The nvmem_unregister() calls device_del() for the device but forgets to > call put_device() to actually release the device object which causes > that memory to be leaked. > > Fix this by calling device_unregister() for the device i

Re: [PATCH] nvmem: core: Prevent memory leak when device is unregistered

2017-05-15 Thread Andy Shevchenko
On Mon, May 15, 2017 at 2:13 PM, Mika Westerberg wrote: > The nvmem_unregister() calls device_del() for the device but forgets to > call put_device() to actually release the device object which causes > that memory to be leaked. > > Fix this by calling device_unregister() for the device intead whi

[PATCH] nvmem: core: Prevent memory leak when device is unregistered

2017-05-15 Thread Mika Westerberg
The nvmem_unregister() calls device_del() for the device but forgets to call put_device() to actually release the device object which causes that memory to be leaked. Fix this by calling device_unregister() for the device intead which also calls put_device() for the device releasing it eventually.