]> Pileus Git - ~andy/linux/commitdiff
xtensa: Cocci spatch "noderef"
authorThomas Meyer <thomas@m3y3r.de>
Thu, 19 Sep 2013 21:42:22 +0000 (23:42 +0200)
committerChris Zankel <chris@zankel.net>
Wed, 16 Oct 2013 18:48:31 +0000 (11:48 -0700)
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>
arch/xtensa/platforms/iss/network.c

index 56f88b7afe2fd907798cd41023133e11c37cf7c8..e9e1aad8c271048d4fde5bdac7ebef7e1cc79a96 100644 (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;
        }