[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100616060738.GA12461@host-a-229.ustcsz.edu.cn>
Date: Wed, 16 Jun 2010 14:07:41 +0800
From: Junchang Wang <junchangwang@...il.com>
To: "Justin P. Mattock" <justinmattock@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-pci@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH 3/5]pci:bus.c Fix variable 'retval' set but not used
On Tue, Jun 15, 2010 at 10:33:52PM -0700, Justin P. Mattock wrote:
>@@ -234,12 +234,10 @@ void pci_bus_add_devices(const struct pci_bus *bus)
> void pci_enable_bridges(struct pci_bus *bus)
> {
> struct pci_dev *dev;
>- int retval;
>
> list_for_each_entry(dev, &bus->devices, bus_list) {
> if (dev->subordinate) {
> if (!pci_is_enabled(dev)) {
>- retval = pci_enable_device(dev);
Hi Justin,
pci_enable_device initializes device before it's used by a driver.
I think you should add check instead of eliminating pci_enable_device.
For example,
retval = pci_enable_device(dev);
if (retval < 0) {
goto handle_err;
}
--Junchang
--
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