]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memory-hotplug-do-not-allocate-pdgat-if-it-was-not-freed-when-offline-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Feb 2013 01:26:32 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:29 +0000 (16:46 +1100)
fix the warning again again

Tested-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory_hotplug.c

index c806abd78d0e5122ee73c60e11450fc8f5836cbc..559e4409cf909071cd885867f4aeecd26cd48fbd 100644 (file)
@@ -1089,7 +1089,10 @@ int __ref add_memory(int nid, u64 start, u64 size)
        if (!res)
                goto out;
 
-       new_pgdat = (NODE_DATA(nid) == NULL);
+       {       /* Stupid hack to suppress address-never-null warning */
+               void *p = NODE_DATA(nid);
+               new_pgdat = !p;
+       }
        new_node = !node_online(nid);
        if (new_node) {
                pgdat = hotadd_new_pgdat(nid, start);