Skip to content

Commit

Permalink
[PATCH] powerpc: hot_add_scn_to_nid() build fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Paul Mackerras committed Mar 27, 2006
1 parent 6088857 commit 069007a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -790,6 +791,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
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:
Expand Down

0 comments on commit 069007a

Please sign in to comment.