Re: [patch] Fix for: OOPS with ns558 and usb-ohci

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Sun Aug 13 2000 - 17:20:15 EST


On Sun, Aug 13, 2000 at 06:05:18PM -0400, Jeff Garzik wrote:
> Vojtech Pavlik wrote:
> > Yes, this is a genuine bug in ns558.c. It calls pci_register_driver and
> > then exits if no gameport is found, without unregistering with the PCI
> > layer. This is wrong. It should stay loaded, even if no cards were found
> > yet, because the pci code could find them later.
> >
> > The attached patch fixes that in a simple way.
> > ------------------------------------------------------------------------
> >
> > ns558.diffName: ns558.diff
> > Type: Plain Text (text/plain)
>
> You should probably use pci_module_init in this case. Note there
> appears to be leak where the structure which is kmalloc'd in the pci
> probe routine is never freed.
>
> Also attached is a patch which fixes a resource leak.

Ok, integrated that, used pci_module_init, the above mentioned memory
leak was there, fixed too ... patch attached. Does it seem ok to you
now?

-- 
Vojtech Pavlik
SuSE Labs


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



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:31 EST