git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
pci
/
hotplug
/
fakephp.c
diff --git
a/drivers/pci/hotplug/fakephp.c
b/drivers/pci/hotplug/fakephp.c
index
71b80c2
..
060d747
100644
(file)
--- a/
drivers/pci/hotplug/fakephp.c
+++ b/
drivers/pci/hotplug/fakephp.c
@@
-95,13
+95,15
@@
static int add_slot(struct pci_dev *dev)
struct hotplug_slot *slot;
int retval = -ENOMEM;
struct hotplug_slot *slot;
int retval = -ENOMEM;
- slot = k
z
alloc(sizeof(struct hotplug_slot), GFP_KERNEL);
+ slot = k
m
alloc(sizeof(struct hotplug_slot), GFP_KERNEL);
if (!slot)
goto error;
if (!slot)
goto error;
+ memset(slot, 0, sizeof(*slot));
- slot->info = k
z
alloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
+ slot->info = k
m
alloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
if (!slot->info)
goto error_slot;
if (!slot->info)
goto error_slot;
+ memset(slot->info, 0, sizeof(struct hotplug_slot_info));
slot->info->power_status = 1;
slot->info->max_bus_speed = PCI_SPEED_UNKNOWN;
slot->info->power_status = 1;
slot->info->max_bus_speed = PCI_SPEED_UNKNOWN;
@@
-225,10
+227,11
@@
static void pci_rescan_bus(const struct pci_bus *bus)
{
unsigned int devfn;
struct pci_dev *dev;
{
unsigned int devfn;
struct pci_dev *dev;
- dev = k
z
alloc(sizeof(struct pci_dev), GFP_KERNEL);
+ dev = k
m
alloc(sizeof(struct pci_dev), GFP_KERNEL);
if (!dev)
return;
if (!dev)
return;
+ memset(dev, 0, sizeof(dev));
dev->bus = (struct pci_bus*)bus;
dev->sysdata = bus->sysdata;
for (devfn = 0; devfn < 0x100; devfn += 8) {
dev->bus = (struct pci_bus*)bus;
dev->sysdata = bus->sysdata;
for (devfn = 0; devfn < 0x100; devfn += 8) {