Re: [PATCH v8 1/6] fieldbus_dev: add Fieldbus Device subsystem.

From: Sven Van Asbroeck
Date: Fri Feb 08 2019 - 11:30:36 EST


On Fri, Feb 8, 2019 at 7:18 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> > +static DEFINE_IDA(fieldbus_ida);
>
> You forget to destroy this ida structure when the module is removed.
> It's a common thing to get wrong :(
>

But fieldbus_ida is allocated on the heap. So as long as calls to
ida_simple_get() and ida_simple_remove() are matched, there
should be no resource leak?

What am I missing?