Re: EISA & sysfs.

Bartlomiej Zolnierkiewicz
2004-02-18T17:17:31Z

Hi,

Consider this:
- both CONFIG_EISA and CONFIG_PCI are defined
- hp100_isa_init() returns an error (ie. -ENODEV)
- eisa_driver_register() and pci_module_init() are called
- hp100_module_init() returns -ENODEV,
module fails to load, so hp100_module_exit() is not called
- &hp100_eisa_driver and &hp100_pci_driver are still happily
registered with sysfs

This is far too common mistake... :-(

On Wednesday 18 of February 2004 17:12, Marc Zyngier wrote:
> >>>>> "Dave" == Dave Jones <davej@redhat.com> writes:
>
> Dave> kernel: kobject_register failed for hp100 (-17)
>
> -17 == -EEXIST.
>
> Looks like the driver was already loaded once, or managed to leave
> some sh*t into sysfs.
>
> Dave> Something also seems awry someplace else..
>
> Dave> (15:54:51:root@mindphaser:linux-2.6.2)# cat /proc/modules | grep
> hp100 Dave> (15:54:55:root@mindphaser:linux-2.6.2)# rmmod hp100
> Dave> ERROR: Module hp100 does not exist in /proc/modules
> Dave> (15:55:18:root@mindphaser:linux-2.6.2)# modprobe hp100
> Dave> FATAL: Module hp100 already in kernel.
> Dave> (15:55:25:root@mindphaser:linux-2.6.2)# cat /proc/modules | grep
> hp100 Dave> (15:55:33:root@mindphaser:linux-2.6.2)#
>
> Dave> Odd.
>
> I've already seen that with half-initialized modules...
>
> M.