public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: linux-mmc@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Julia Lawall <julia@diku.dk>
Subject: Re: [PATCH] cb710: fix possible pci_dev leak in cb710_pci_configure()
Date: Thu, 28 Jul 2011 22:34:07 +0000	[thread overview]
Message-ID: <m2y5zihw68.fsf@bob.laptop.org> (raw)
In-Reply-To: <d8d89ffdad20168a3c2273418aff74036eb24add.1311879121.git.mirq-linux@rere.qmqm.pl> ("Michał Mirosław"'s message of "Thu, 28 Jul 2011 20:55:27 +0200 (CEST)")

Hi Michał,

On Thu, Jul 28 2011, Michał Mirosław wrote:
> Reported-by: Julia Lawall <julia@diku.dk>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/misc/cb710/core.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
> index efec413..68cd05b 100644
> --- a/drivers/misc/cb710/core.c
> +++ b/drivers/misc/cb710/core.c
> @@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(cb710_pci_update_config_reg);
>  static int __devinit cb710_pci_configure(struct pci_dev *pdev)
>  {
>  	unsigned int devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0);
> -	struct pci_dev *pdev0 = pci_get_slot(pdev->bus, devfn);
> +	struct pci_dev *pdev0;
>  	u32 val;
>  
>  	cb710_pci_update_config_reg(pdev, 0x48,
> @@ -43,6 +43,7 @@ static int __devinit cb710_pci_configure(struct pci_dev *pdev)
>  	if (val & 0x80000000)
>  		return 0;
>  
> +	pdev0 = pci_get_slot(pdev->bus, devfn);
>  	if (!pdev0)
>  		return -ENODEV;

Pushed to mmc-next for 3.1, thanks.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

      reply	other threads:[~2011-07-28 22:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1311870407-22461-1-git-send-email-julia@diku.dk>
2011-07-28 18:33 ` [PATCH 1/2] drivers/misc/cb710/core.c: Add missing pci_dev_put Michał Mirosław
2011-07-28 18:55   ` [PATCH] cb710: fix possible pci_dev leak in Michał Mirosław
2011-07-28 22:34     ` Chris Ball [this message]

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=m2y5zihw68.fsf@bob.laptop.org \
    --to=cjb@laptop.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    /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