diff options
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_ctrl.c')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_ctrl.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 37d72f123a80..dcafa2aaef8a 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -973,16 +973,13 @@ struct pci_func *cpqhp_slot_create(u8 busnumber) | |||
973 | struct pci_func *new_slot; | 973 | struct pci_func *new_slot; |
974 | struct pci_func *next; | 974 | struct pci_func *next; |
975 | 975 | ||
976 | new_slot = kmalloc(sizeof(*new_slot), GFP_KERNEL); | 976 | new_slot = kzalloc(sizeof(*new_slot), GFP_KERNEL); |
977 | |||
978 | if (new_slot == NULL) { | 977 | if (new_slot == NULL) { |
979 | /* I'm not dead yet! | 978 | /* I'm not dead yet! |
980 | * You will be. */ | 979 | * You will be. */ |
981 | return new_slot; | 980 | return new_slot; |
982 | } | 981 | } |
983 | 982 | ||
984 | memset(new_slot, 0, sizeof(struct pci_func)); | ||
985 | |||
986 | new_slot->next = NULL; | 983 | new_slot->next = NULL; |
987 | new_slot->configured = 1; | 984 | new_slot->configured = 1; |
988 | 985 | ||