* l440gx: weird PCI refcounting
@ 2010-01-13 15:56 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2010-01-13 15:56 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-pci, linux-mtd
Hi,
stanse found two PCI device double puts in l440gx code.
init_l440gx looks like:
dev = pci_get_device(PCI_VENDOR_ID_INTEL,...);
pm_dev = pci_get_device(PCI_VENDOR_ID_INTEL,...);
pci_dev_put(dev); // first
...
if (!(pm_iobase->flags & IORESOURCE_IO)) {
...
pci_dev_put(pm_dev); // first
...
if (pci_assign_resource(pm_dev, PIIXE_IOBASE_RESOURCE) != 0) {
pci_dev_put(dev); // second
pci_dev_put(pm_dev); // second
return -ENXIO;
}
}
I would fix it, but I don't see from that, what the code should do.
pm_dev is used after it's put. And to add, cleanup_l440gx doesn't
contain any puts at all.
Any ideas?
References:
http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=33-rc&id=635#l84
http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=33-rc&id=636#l48
--
js
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-13 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 15:56 l440gx: weird PCI refcounting Jiri Slaby
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.