[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161114141123.GA21395@kroah.com>
Date: Mon, 14 Nov 2016 15:11:23 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Guenter Roeck <linux@...ck-us.net>,
Oliver Neukum <oneukum@...e.com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Bin Gao <bin.gao@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATHCv10 1/2] usb: USB Type-C connector class
On Mon, Nov 14, 2016 at 02:32:35PM +0200, Heikki Krogerus wrote:
> > > +static void __exit typec_exit(void)
> > > +{
> > > + class_unregister(&typec_class);
> >
> > You forgot to clean up your idr :(
>
> Sorry, what idr? The port ids get removed in typec_release().
You have a static idr structure in the driver, right? You have to clean
it up when your code is going away so that it will free any memory it
had allocated with a call to idr_destroy() on module exit.
thanks,
greg k-h
Powered by blists - more mailing lists