diff options
| author | Jeff Dike <jdike@addtoit.com> | 2006-09-27 04:50:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:16 -0400 |
| commit | 1183dc943cae8b0fddca0b310c26052b2355e04b (patch) | |
| tree | 9bf94e50ca050459fb8bfe743bf203ce2654cf11 /arch/um | |
| parent | c1b4098d4852f823ecf1abb2d369cb1beb902653 (diff) | |
[PATCH] uml: fix allocation size
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>
Diffstat (limited to 'arch/um')
| -rw-r--r-- | arch/um/drivers/net_kern.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 657dfacd5ba8..664c2e2fb820 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
| @@ -561,12 +561,13 @@ static int eth_setup(char *str) | |||
| 561 | int n, err; | 561 | int n, err; |
| 562 | 562 | ||
| 563 | err = eth_parse(str, &n, &str); | 563 | err = eth_parse(str, &n, &str); |
| 564 | if(err) return(1); | 564 | if(err) |
| 565 | return 1; | ||
| 565 | 566 | ||
| 566 | new = alloc_bootmem(sizeof(new)); | 567 | new = alloc_bootmem(sizeof(*new)); |
| 567 | if (new == NULL){ | 568 | if (new == NULL){ |
| 568 | printk("eth_init : alloc_bootmem failed\n"); | 569 | printk("eth_init : alloc_bootmem failed\n"); |
| 569 | return(1); | 570 | return 1; |
| 570 | } | 571 | } |
| 571 | 572 | ||
| 572 | INIT_LIST_HEAD(&new->list); | 573 | INIT_LIST_HEAD(&new->list); |
| @@ -574,7 +575,7 @@ static int eth_setup(char *str) | |||
| 574 | new->init = str; | 575 | new->init = str; |
| 575 | 576 | ||
| 576 | list_add_tail(&new->list, ð_cmd_line); | 577 | list_add_tail(&new->list, ð_cmd_line); |
| 577 | return(1); | 578 | return 1; |
| 578 | } | 579 | } |
| 579 | 580 | ||
| 580 | __setup("eth", eth_setup); | 581 | __setup("eth", eth_setup); |
