From: Greg KH <gregkh@suse.de>
To: Atul Sowani <sowani@gmail.com>
Cc: arnaud.patard@rtp-net.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
Date: Tue, 2 Nov 2010 08:18:29 -0700 [thread overview]
Message-ID: <20101102151829.GB2033@suse.de> (raw)
In-Reply-To: <4CD02860.2020103@gmail.com>
On Tue, Nov 02, 2010 at 08:34:00PM +0530, Atul Sowani wrote:
> Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is
> recommended in pci.txt filei in PCI Documentation.
Yes, but you just caused a resource leak :(
>
> Signed-off-by: Atul Sowani <sowani@gmail.com>
> ---
> diff -uprN a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
> --- a/drivers/staging/xgifb/XGI_main_26.c 2010-10-21 02:00:22.000000000 +0530
> +++ b/drivers/staging/xgifb/XGI_main_26.c 2010-11-01 14:25:21.032436943 +0530
> @@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_
> break;
> }
>
> - pdev = pci_find_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
> + pdev = pci_get_device(PCI_VENDOR_ID_SI, nbridge_id, pdev);
Please read the documentation for pci_get_device() for the fact that you
now have a reference to the pci device. You need to properly drop it
when finished.
Please change this patch to do that properly and I will be glad to apply
it.
thanks,
greg k-h
next prev parent reply other threads:[~2010-11-02 15:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 15:04 [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device() Atul Sowani
2010-11-02 15:18 ` Greg KH [this message]
2010-11-02 15:21 ` Arnaud Patard
2010-11-02 15:27 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2010-11-03 13:10 Atul Sowani
2010-11-03 13:18 ` Arnaud Patard
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=20101102151829.GB2033@suse.de \
--to=gregkh@suse.de \
--cc=arnaud.patard@rtp-net.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sowani@gmail.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 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.