projects/linux·commit f447fd30

xtensa: Cocci spatch "noderef"

f447fd30 · Thomas Meyer <[email protected]> · 2013-09-19 23:42:22 +02:00

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 <[email protected]>
Signed-off-by: Chris Zankel <[email protected]>
Commit
f447fd30afdbb40c913054edaacf1a32df7a55d7
Parents
cba9a900

Changes

1 files changed · +2 −1

FileStatusAddDelContent
arch/xtensa/platforms/iss/network.cmodified+2−1View file

arch/xtensa/platforms/iss/network.c

View file
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 56f88b7..e9e1aad 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/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;
}