lkml.org 
[lkml]   [2007]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11] drivers/pci/hotplug/cpqphp_ctrl.c: kmalloc + memset conversion to kzalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

drivers/pci/hotplug/cpqphp_ctrl.c | 79698 -> 79638 (-60 bytes)
drivers/pci/hotplug/cpqphp_ctrl.o | 192896 -> 192736 (-160 bytes)

drivers/pci/hotplug/cpqphp_ctrl.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

--- linux-2.6.23-rc1-mm1-a/drivers/pci/hotplug/cpqphp_ctrl.c 2007-07-26 13:07:43.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/drivers/pci/hotplug/cpqphp_ctrl.c 2007-07-31 13:56:47.000000000 +0200
@@ -973,16 +973,13 @@ struct pci_func *cpqhp_slot_create(u8 bu
struct pci_func *new_slot;
struct pci_func *next;

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

- memset(new_slot, 0, sizeof(struct pci_func));
-
new_slot->next = NULL;
new_slot->configured = 1;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-31 19:17    [W:0.255 / U:19.152 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site