Skip to content

Commit

Permalink
PCI Hotplug: cpqphp_ctrl.c: kmalloc + memset conversion to kzalloc
Browse files Browse the repository at this point in the history
 drivers/pci/hotplug/cpqphp_ctrl.c | 79698 -> 79638 (-60 bytes)
 drivers/pci/hotplug/cpqphp_ctrl.o | 192896 -> 192736 (-160 bytes)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mariusz Kozlowski authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 782e3b3 commit 73a985a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/pci/hotplug/cpqphp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,16 +973,13 @@ struct pci_func *cpqhp_slot_create(u8 busnumber)
struct pci_func *new_slot;
struct pci_func *next;

new_slot = kmalloc(sizeof(*new_slot), GFP_KERNEL);

new_slot = kzalloc(sizeof(*new_slot), GFP_KERNEL);
if (new_slot == NULL) {
/* I'm not dead yet!
* You will be. */
return new_slot;
}

memset(new_slot, 0, sizeof(struct pci_func));

new_slot->next = NULL;
new_slot->configured = 1;

Expand Down

0 comments on commit 73a985a

Please sign in to comment.