Skip to content

Commit

Permalink
[ISDN]: Get rid of some pointless allocation casts in common and bsd …
Browse files Browse the repository at this point in the history
…comp.

vmalloc() returns a void pointer - no need to cast the return value.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Aug 27, 2007
1 parent c573f73 commit 7c8347a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions drivers/isdn/i4l/isdn_bsdcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
* Allocate space for the dictionary. This may be more than one page in
* length.
*/
db->dict = (struct bsd_dict *) vmalloc (hsize * sizeof (struct bsd_dict));
db->dict = vmalloc(hsize * sizeof(struct bsd_dict));
if (!db->dict) {
bsd_free (db);
return NULL;
Expand All @@ -354,8 +354,7 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
if (!decomp)
db->lens = NULL;
else {
db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) *
sizeof (db->lens[0]));
db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0]));
if (!db->lens) {
bsd_free (db);
return (NULL);
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/i4l/isdn_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ static int __init isdn_init(void)
int i;
char tmprev[50];

if (!(dev = (isdn_dev *) vmalloc(sizeof(isdn_dev)))) {
if (!(dev = vmalloc(sizeof(isdn_dev)))) {
printk(KERN_WARNING "isdn: Could not allocate device-struct.\n");
return -EIO;
}
Expand Down

0 comments on commit 7c8347a

Please sign in to comment.