summaryrefslogtreecommitdiffstats
path: root/drivers/net/slhc.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-07-13 12:10:48 +0100
committerJeff Garzik <jeff@garzik.org>2006-07-19 13:50:39 -0400
commit15880352659a363209c5ad9cfc796a9c8a7f5196 (patch)
tree122365b897cff1dd81ee5d372c7c9360620097f7 /drivers/net/slhc.c
parentb6e37e55c250f5233401b2566b1a4b512a98bc7b (diff)
downloadlinux-15880352659a363209c5ad9cfc796a9c8a7f5196.tar.gz
linux-15880352659a363209c5ad9cfc796a9c8a7f5196.tar.bz2
linux-15880352659a363209c5ad9cfc796a9c8a7f5196.zip
[PATCH] Convert to kzalloc
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/slhc.c')
-rw-r--r--drivers/net/slhc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c
index 3a1b7131681c..f0adad520af2 100644
--- a/drivers/net/slhc.c
+++ b/drivers/net/slhc.c
@@ -94,27 +94,24 @@ slhc_init(int rslots, int tslots)
register struct cstate *ts;
struct slcompress *comp;
- comp = (struct slcompress *)kmalloc(sizeof(struct slcompress),
+ comp = (struct slcompress *)kzalloc(sizeof(struct slcompress),
GFP_KERNEL);
if (! comp)
goto out_fail;
- memset(comp, 0, sizeof(struct slcompress));
if ( rslots > 0 && rslots < 256 ) {
size_t rsize = rslots * sizeof(struct cstate);
- comp->rstate = (struct cstate *) kmalloc(rsize, GFP_KERNEL);
+ comp->rstate = (struct cstate *) kzalloc(rsize, GFP_KERNEL);
if (! comp->rstate)
goto out_free;
- memset(comp->rstate, 0, rsize);
comp->rslot_limit = rslots - 1;
}
if ( tslots > 0 && tslots < 256 ) {
size_t tsize = tslots * sizeof(struct cstate);
- comp->tstate = (struct cstate *) kmalloc(tsize, GFP_KERNEL);
+ comp->tstate = (struct cstate *) kzalloc(tsize, GFP_KERNEL);
if (! comp->tstate)
goto out_free2;
- memset(comp->tstate, 0, tsize);
comp->tslot_limit = tslots - 1;
}