[PATCH] powerpc: hot_add_scn_to_nid() build fix
authorAndrew Morton <akpm@osdl.org>
Fri, 24 Mar 2006 10:34:46 +0000 (02:34 -0800)
committerPaul Mackerras <paulus@samba.org>
Mon, 27 Mar 2006 03:48:34 +0000 (14:48 +1100)
The return statement is to prevent `warning: 'nid' might be used uninitialized
in this function'.

Cc: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/numa.c

index e89b22aa539e477e79ad9dc26181d09aa19e859a..0a335f34974c931ce10895cffed240b4d92a645b 100644 (file)
@@ -756,6 +756,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
        struct device_node *memory = NULL;
        nodemask_t nodes;
        int default_nid = any_online_node(NODE_MASK_ALL);
+       int nid;
 
        if (!numa_enabled || (min_common_depth < 0))
                return default_nid;
@@ -790,6 +791,7 @@ ha_new_range:
                        goto ha_new_range;
        }
        BUG();  /* section address should be found above */
+       return 0;
 
        /* Temporary code to ensure that returned node is not empty */
 got_nid: