Skip to content

Commit

Permalink
xtensa: Cocci spatch "noderef"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Meyer authored and Chris Zankel committed Oct 16, 2013
1 parent cba9a90 commit f447fd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/xtensa/platforms/iss/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f447fd3

Please sign in to comment.