From: Andrew Morton <akpm@osdl.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm] removes pci_find_device from i6300esb.c
Date: Mon, 8 Aug 2005 23:34:29 -0700 [thread overview]
Message-ID: <20050808233429.36e6ebd5.akpm@osdl.org> (raw)
In-Reply-To: <200508082355.j78NtGNS029681@wscnet.wsc.cz>
Jiri Slaby <jirislaby@gmail.com> wrote:
>
> --- a/drivers/char/watchdog/i6300esb.c
> +++ b/drivers/char/watchdog/i6300esb.c
> @@ -368,12 +368,11 @@ static unsigned char __init esb_getdevic
> * Find the PCI device
> */
>
> - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
> + for_each_pci_dev(dev)
> if (pci_match_id(esb_pci_tbl, dev)) {
> esb_pci = dev;
> break;
> }
> - }
>
> if (esb_pci) {
> if (pci_enable_device(esb_pci)) {
> @@ -430,6 +429,7 @@ err_release:
> pci_release_region(esb_pci, 0);
> err_disable:
> pci_disable_device(esb_pci);
> + pci_dev_put(esb_pci);
That doesn't look right. Each iteration of for_each_pci_dev() needs a
pci_dev_put(), not just the final one.
next prev parent reply other threads:[~2005-08-09 6:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-08 10:34 [PATCH -mm] i6300esb.c uses pci_find_device Jiri Slaby
2005-08-08 23:55 ` [PATCH -mm] removes pci_find_device from i6300esb.c Jiri Slaby
2005-08-09 5:59 ` Greg KH
2005-08-09 16:06 ` Jiri Slaby
2005-08-09 23:37 ` Greg KH
2005-08-10 0:09 ` [PATCH 0/2] pci_find_device patches Jiri Slaby
2005-08-10 0:09 ` [PATCH -mm 1/2] removes pci_find_device from i6300esb.c Jiri Slaby
2005-08-16 0:24 ` [PATCH] " Jiri Slaby
2005-08-16 0:28 ` Greg KH
2005-08-10 0:09 ` [PATCH 2/2] removes pci_find_device from parport_pc.c Jiri Slaby
2005-08-09 6:34 ` Andrew Morton [this message]
2005-08-09 9:28 ` [PATCH -mm] removes pci_find_device from i6300esb.c Jiri Slaby
2005-08-09 21:56 ` Greg KH
2005-08-09 9:53 ` Jiri Slaby
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=20050808233429.36e6ebd5.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome