Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35079
b: refs/heads/master
c: 1588035
h: refs/heads/master
i:
  35077: c63d286
  35075: 02142f4
  35071: fd9a325
v: v3
  • Loading branch information
Ralf Baechle authored and Jeff Garzik committed Jul 19, 2006
1 parent ff1ac94 commit d2338f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6e37e55c250f5233401b2566b1a4b512a98bc7b
refs/heads/master: 15880352659a363209c5ad9cfc796a9c8a7f5196
9 changes: 3 additions & 6 deletions trunk/drivers/net/slhc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d2338f6

Please sign in to comment.