public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: Make pci_dev struct point to NULL.
@ 2009-12-04 16:35 Rakib Mullick
  2009-12-04 20:27 ` Alex Chiang
  0 siblings, 1 reply; 8+ messages in thread
From: Rakib Mullick @ 2009-12-04 16:35 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-pci, LKML, Andrew Morton

 pci: Make pci_dev struct point to NULL.

In function enable_device of acpiphp_glue.c, structure pci_dev
doesn't point anything. Due to the check in line 975 we might
end up being uninitialized. So make it point to NULL.

---
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>

--- linus/drivers/pci/hotplug/acpiphp_glue.c	2009-12-03 21:30:57.000000000 +0600
+++ rakib/drivers/pci/hotplug/acpiphp_glue.c	2009-12-03 23:53:44.000000000 +0600
@@ -964,7 +964,7 @@ static int acpiphp_bus_trim(acpi_handle
  */
 static int __ref enable_device(struct acpiphp_slot *slot)
 {
-	struct pci_dev *dev;
+	struct pci_dev *dev = NULL;
 	struct pci_bus *bus = slot->bridge->pci_bus;
 	struct list_head *l;
 	struct acpiphp_func *func;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-05  5:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04 16:35 [PATCH] pci: Make pci_dev struct point to NULL Rakib Mullick
2009-12-04 20:27 ` Alex Chiang
2009-12-05  1:53   ` Rakib Mullick
2009-12-05  4:36     ` Alex Chiang
2009-12-05  4:37       ` Alex Chiang
2009-12-05  5:18       ` Rakib Mullick
2009-12-05  5:28         ` Alex Chiang
2009-12-05  5:47           ` Rakib Mullick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox