1
0
Fork 0

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>
hifive-unleashed-5.1
Thomas Meyer 2013-09-19 23:42:22 +02:00 committed by Chris Zankel
parent cba9a90053
commit f447fd30af
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}