lkml.org 
[lkml]   [2020]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/16] bus: mhi: core: Add support for registering MHI controllers
Hi Greg,

On Thu, Jan 23, 2020 at 12:33:42PM +0100, Greg KH wrote:
> On Thu, Jan 23, 2020 at 04:48:22PM +0530, Manivannan Sadhasivam wrote:
> > +static inline void mhi_dealloc_device(struct mhi_controller *mhi_cntrl,
> > + struct mhi_device *mhi_dev)
> > +{
> > + kfree(mhi_dev);
> > +}
>
> You just leaked memory, please read the documentation for
> device_initialize().
>
> :(

Ah, okay. My bad. Should've used put_device(&mhi_dev->dev) here also to
drop the ref count. Will add it in next iteration.

Thanks,
Mani

\
 
 \ /
  Last update: 2020-01-23 12:57    [W:0.165 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site