fix sysfs leak drivers/net/dgrs.c
Subsystems (2)
PATCH 1/1 fix sysfs leak drivers/net/dgrs.c
if the driver fails to load, leaves a dgrs dir in sysfs.
belows patch is far from beautifull,
but keeps logic of dgrs_init_module().
test compiled.
as follow up to:
http://marc.theaimsgroup.com/?l=linux-kernel&m7938809308387&w=2
when chasing eisa_driver_register returns, i found a lot of unchecked pci_register_driver, should i add this one to kj TODO?
regards
maks
drivers/net/dgrs.c +4 -0
@@ -1586,11 +1586,15 @@*/ #ifdef CONFIG_EISA eisacount =eisa_driver_register (&dgrs_eisa_driver); +if (eisacount <=0 ) +eisa_driver_unregister (&dgrs_eisa_driver);if (eisacount <0 )return eisacount;#endif #ifdef CONFIG_PCI pcicount =pci_register_driver (&dgrs_pci_driver); +if (pcicount <=0 ) +pci_unregister_driver (&dgrs_pci_driver);if (pcicount <0 )return pcicount;#endif
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 5 lines · maximilian attems
if the driver fails to load, leaves a dgrs dir in sysfs.
belows patch is far from beautifull,
but keeps logic ofdgrs_init_module().
Quoted 8 lines
test compiled.
as follow up to:
http://marc.theaimsgroup.com/?l=linux-kernel&m7938809308387&w=2when chasing
eisa_driver_registerreturns, i found a lot of uncheckedpci_register_driver, should i add this one to kj TODO?
Yes, and all pci_module_init() calls need to be changed to pci_register_driver() but that's a 2.7 thing...
thanks,
greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors