From: "Jean Delvare" <khali@linux-fr.org>
To: greg@kroah.com, aurelien@aurel32.net
Cc: "Alexey Dobriyan" <adobriyan@mail.ru>,
"LKML" <linux-kernel@vger.kernel.org>,
"LM Sensors" <sensors@Stimpy.netroedge.com>
Subject: Re: [PATCH 2.6] I2C: New chip driver: sis5595
Date: Tue, 1 Feb 2005 18:00:48 +0100 (CET) [thread overview]
Message-ID: <UG87F3dV.1107277247.9606340.khali@localhost> (raw)
In-Reply-To: <20050201165434.GD23118@kroah.com>
Hi Greg & all,
> > +/* Locate SiS bridge and correct base address for SIS5595 */
> > +static int sis5595_find_sis(int *address)
> > +{
> > + u16 val;
> > + int *i;
> > +
> > + if (!(s_bridge =
> > + pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, NULL)))
> > + return -ENODEV;
>
> You never free the reference you grabbed on the pci_dev here. Please
> read the docs on how pci_get_device() is to be used, it isn't just a
> drop in replacement for pci_find_device(), sorry.
>
> > + /* Look for imposters */
> > + for(i = blacklist; *i != 0; i++) {
> > + if (pci_get_device(PCI_VENDOR_ID_SI, *i, NULL)) {
>
> Same here, you are leaking a reference count.
>
> Why are you not using the pci driver interface instead?
Not sure it exactly answers your question, but the sis5595 much
ressembles the via686a in that respect, i.e. it isn't driving a PCI
device, merely grabbing the ISA I/O address data from PCI configuration
space, then driving that ISA device. I'd guess that whatever was done
in via686a (including the recent updates) should work equally well for
the sis5595.
Thanks,
--
Jean Delvare
next prev parent reply other threads:[~2005-02-01 17:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-01 12:20 [PATCH 2.6] I2C: New chip driver: sis5595 Alexey Dobriyan
2005-02-01 11:49 ` Jean Delvare
2005-02-01 14:12 ` Alexey Dobriyan
2005-02-01 13:52 ` Jean Delvare
2005-02-01 14:43 ` Jean Delvare
2005-02-01 16:57 ` Alexey Dobriyan
2005-02-01 16:42 ` Jean Delvare
2005-02-01 12:14 ` Aurelien Jarno
2005-02-01 16:54 ` Greg KH
2005-02-01 17:00 ` Jean Delvare [this message]
2005-02-01 16:55 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-01-25 22:09 Aurélien Jarno
2005-01-31 18:21 ` Greg KH
2005-02-01 10:11 ` Aurelien Jarno
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=UG87F3dV.1107277247.9606340.khali@localhost \
--to=khali@linux-fr.org \
--cc=adobriyan@mail.ru \
--cc=aurelien@aurel32.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@Stimpy.netroedge.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox