Skip to content

Commit

Permalink
[PATCH] uml: fix allocation size
Browse files Browse the repository at this point in the history
Fix an instance of ptr=alloc(sizeof(ptr)).  Grepping showed no more instances
of this pattern.

Also fixed the formatting in the area.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Sep 27, 2006
1 parent c1b4098 commit 1183dc9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,20 +561,21 @@ static int eth_setup(char *str)
int n, err;

err = eth_parse(str, &n, &str);
if(err) return(1);
if(err)
return 1;

new = alloc_bootmem(sizeof(new));
new = alloc_bootmem(sizeof(*new));
if (new == NULL){
printk("eth_init : alloc_bootmem failed\n");
return(1);
return 1;
}

INIT_LIST_HEAD(&new->list);
new->index = n;
new->init = str;

list_add_tail(&new->list, &eth_cmd_line);
return(1);
return 1;
}

__setup("eth", eth_setup);
Expand Down

0 comments on commit 1183dc9

Please sign in to comment.