lkml.org 
[lkml]   [2009]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] pci: Make pci_dev struct point to NULL.
From
 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;

\
 
 \ /
  Last update: 2009-12-04 17:37    [W:0.045 / U:2.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site