lkml.org 
[lkml]   [2010]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.36 1/1] xgifb: change obsolete pci_find_device() with pci_get_device().
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


\
 
 \ /
  Last update: 2010-11-02 16:21    [W:0.051 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site