Re: [PATCH 28] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
- From: Krzysztof Halasa <khc@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 21:47:21 +0200
Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx> writes:
+++ linux-2.6.23-rc1-mm1-b/drivers/net/wan/hdlc_fr.c 2007-07-30 00:25:40.000000000 +0200
@@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_de
pvc_p = &(*pvc_p)->next;
}
- pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC);
+ pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC);
#ifdef DEBUG_PVC
printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev);
#endif
if (!pvc)
return NULL;
- memset(pvc, 0, sizeof(pvc_device));
Looks good, thanks.
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- From: Mariusz Kozlowski
- [PATCH 28] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
- From: Mariusz Kozlowski
- [KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
- Prev by Date: WATCHDOG] v2.6.23 patches 2
- Next by Date: Re: [patch 00/26] 2.6.21.7 -stable review
- Previous by thread: [PATCH 28] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
- Next by thread: [PATCH 29] drivers/mmc/core/host.c: kmalloc + memset conversion to kzalloc
- Index(es):
Relevant Pages
|
|