From: Jeff Dike Date: Wed, 27 Sep 2006 08:50:43 +0000 (-0700) Subject: [PATCH] uml: fix allocation size X-Git-Tag: v2.6.19-rc1~931 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1183dc943cae8b0fddca0b310c26052b2355e04b;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 657dfacd5ba..664c2e2fb82 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) 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); @@ -574,7 +575,7 @@ static int eth_setup(char *str) new->init = str; list_add_tail(&new->list, ð_cmd_line); - return(1); + return 1; } __setup("eth", eth_setup);