Re: [3C509] Fix sysfs leak.

From: Dave Jones
Date: Tue Mar 16 2004 - 11:20:09 EST


On Tue, Mar 16, 2004 at 11:06:10AM -0500, Jeff Garzik wrote:
> Dave Jones wrote:
> >On Tue, Mar 16, 2004 at 11:56:37AM +0100, Marc Zyngier wrote:
> > > >>>>> "davej" == davej <davej@xxxxxxxxxx> writes:
> > >
> > > davej> #ifdef CONFIG_EISA
> > > davej> - if (eisa_driver_register (&el3_eisa_driver) < 0) {
> > > davej> + if (eisa_driver_register (&el3_eisa_driver) <= 0) {
> > > davej> eisa_driver_unregister (&el3_eisa_driver);
> > > davej> }
> > > davej> #endif
> > >
> > > This is bogus. eisa_driver_register returns 0 when it *succeeds*.
> >
> >Then the probing routine is bogus, it returns 0 when it fails too.
>
> No, for the hotplug case the API allows registration to succeed, then
> probing calls the ->init_one function later.

Not when the module buggers off afterwards it doesn't.
->init_one points to lala land at that point.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/