From: Jiri Slaby <jirislaby@gmail.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-pci@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: l440gx: weird PCI refcounting
Date: Wed, 13 Jan 2010 16:56:45 +0100 [thread overview]
Message-ID: <4B4DED3D.9060609@gmail.com> (raw)
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
reply other threads:[~2010-01-13 15:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4DED3D.9060609@gmail.com \
--to=jirislaby@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.