Browse Source

xtensa: Cocci spatch "noderef"

sizeof when applied to a pointer typed expression gives the size of the
pointer.
Found by coccinelle spatch "misc/noderef.cocci"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Chris Zankel <chris@zankel.net>
Thomas Meyer 11 years ago
parent
commit
f447fd30af
1 changed files with 2 additions and 1 deletions
  1. 2 1
      arch/xtensa/platforms/iss/network.c

+ 2 - 1
arch/xtensa/platforms/iss/network.c

@@ -737,7 +737,8 @@ static int __init iss_net_setup(char *str)
 		return 1;
 	}
 
-	if ((new = alloc_bootmem(sizeof new)) == NULL) {
+	new = alloc_bootmem(sizeof(*new));
+	if (new == NULL) {
 		printk("Alloc_bootmem failed\n");
 		return 1;
 	}