summaryrefslogtreecommitdiff
path: root/drivers/net/slhc.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-07-13 12:12:53 +0100
committerJeff Garzik <jeff@garzik.org>2006-07-19 13:50:39 -0400
commit79690602adc5b52ce224df6ac67bde0074b2aede (patch)
tree6cb4c9008c5f02cc2ca4cbebe7cc31636042c4b4 /drivers/net/slhc.c
parent15880352659a363209c5ad9cfc796a9c8a7f5196 (diff)
downloadlwn-79690602adc5b52ce224df6ac67bde0074b2aede.tar.gz
lwn-79690602adc5b52ce224df6ac67bde0074b2aede.zip
[PATCH] Remove useless casts
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.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c
index f0adad520af2..24bbe00852b2 100644
--- a/drivers/net/slhc.c
+++ b/drivers/net/slhc.c
@@ -94,14 +94,13 @@ slhc_init(int rslots, int tslots)
register struct cstate *ts;
struct slcompress *comp;
- comp = (struct slcompress *)kzalloc(sizeof(struct slcompress),
- GFP_KERNEL);
+ comp = kzalloc(sizeof(struct slcompress), GFP_KERNEL);
if (! comp)
goto out_fail;
if ( rslots > 0 && rslots < 256 ) {
size_t rsize = rslots * sizeof(struct cstate);
- comp->rstate = (struct cstate *) kzalloc(rsize, GFP_KERNEL);
+ comp->rstate = kzalloc(rsize, GFP_KERNEL);
if (! comp->rstate)
goto out_free;
comp->rslot_limit = rslots - 1;
@@ -109,7 +108,7 @@ slhc_init(int rslots, int tslots)
if ( tslots > 0 && tslots < 256 ) {
size_t tsize = tslots * sizeof(struct cstate);
- comp->tstate = (struct cstate *) kzalloc(tsize, GFP_KERNEL);
+ comp->tstate = kzalloc(tsize, GFP_KERNEL);
if (! comp->tstate)
goto out_free2;
comp->tslot_limit = tslots - 1;
@@ -138,9 +137,9 @@ slhc_init(int rslots, int tslots)
return comp;
out_free2:
- kfree((unsigned char *)comp->rstate);
+ kfree(comp->rstate);
out_free:
- kfree((unsigned char *)comp);
+ kfree(comp);
out_fail:
return NULL;
}