diff options
author | Bernhard Walle <bwalle@suse.de> | 2008-10-09 19:01:25 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-10-10 09:28:08 +1100 |
commit | 84aa7cf2468c2921d61d4cb97c1df670a470ea8b (patch) | |
tree | a68dffda7f3026737d92f220a46403acd617a00e | |
parent | 1d19ca0c4306c3c684cf4d277781975e4ad1c193 (diff) |
Use return value of count_dyn_reconf_memory_ranges()
This patch fixes the build error
kexec/arch/ppc64/kexec-ppc64.c:140: \
warning: control reaches end of non-void function
The patch returns 0 on success, and checks when the function is called
for a non-zero value.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/ppc64/kexec-ppc64.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c index 40258b7..069a9fc 100644 --- a/kexec/arch/ppc64/kexec-ppc64.c +++ b/kexec/arch/ppc64/kexec-ppc64.c @@ -137,6 +137,8 @@ static int count_dyn_reconf_memory_ranges(void) num_of_lmbs = ((unsigned int *)buf)[0]; max_memory_ranges += num_of_lmbs; fclose(file); + + return 0; } /* @@ -158,7 +160,8 @@ static int count_memory_ranges(void) while ((dentry = readdir(dir)) != NULL) { if (!strncmp(dentry->d_name, "ibm,dynamic-reconfiguration-memory", 35)){ - count_dyn_reconf_memory_ranges(); + if (count_dyn_reconf_memory_ranges() != 0) + return -1; continue; } |