Re: [PATCH 1/2] drivers/misc/cb710/core.c: Add missing pci_dev_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 28, 2011 at 06:26:46PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@xxxxxxx>
> Pci_get_slot calls pci_dev_get, so pci_dev_put is needed before leaving the
> function.
[...]
> --- a/drivers/misc/cb710/core.c
> +++ b/drivers/misc/cb710/core.c
> @@ -41,7 +41,7 @@ static int __devinit cb710_pci_configure(struct pci_dev *pdev)
>  
>  	pci_read_config_dword(pdev, 0x48, &val);
>  	if (val & 0x80000000)
> -		return 0;
> +		goto out;
>  
>  	if (!pdev0)
>  		return -ENODEV;

The good fix is to use pci_get_slot() before the !pdev0 condition above.
I'll send a patch shortly.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux