[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9df5fa10912041753n27e60020x2dd41eb50f4608ff@mail.gmail.com>
Date: Sat, 5 Dec 2009 07:53:05 +0600
From: Rakib Mullick <rakib.mullick@...il.com>
To: Alex Chiang <achiang@...com>
Cc: Jesse Barnes <jbarnes@...tuousgeek.org>, linux-pci@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] pci: Make pci_dev struct point to NULL.
On 12/5/09, Alex Chiang <achiang@...com> wrote:
> * Rakib Mullick <rakib.mullick@...il.com>:
>
> This is from Linus's latest tree:
>
> 974
> 975 if (slot->flags & SLOT_ENABLED)
> 976 goto err_exit;
I'm talking about this line. From here we can hit 'goto err_exit' without
using pci_get_slot.
> 977
> 978 /* sanity check: dev should be NULL when hot-plugged in */
> 979 dev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0));
> 980 if (dev) {
>
> I assume your line 975 is my line 980.
Nope, my line 975 is also yours.
>
> pci_get_slot() returns NULL if it doesn't find the devfn, so as
> far as I can tell, there's no need to initialize dev to NULL.
>
> Were you fixing a real bug with this patch? Did you actually get
> the "pci_dev structure already exists.\n" error message?
>
No - i'm trying to make sure that we're not referencing into a trash.
> Thanks,
>
> /ac
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists