[PATCH] fix wrong return code of sysinfo_show() when get_zeroed_page() fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Function sysinfo_show() defined in arch/s390/kernel/sysinfo.c returns
 wrong error code when function get_zeroed_page() fails. The correct
 return code when get_zeroed_page() fails is -ENOMEM but the code returns 0.
---
 arch/s390/kernel/sysinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index 12f80d1..1da471f 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -280,7 +280,7 @@ static int sysinfo_show(struct seq_file *m, void *v)
 	int level;
 
 	if (!info)
-		return 0;
+		return -ENOMEM;
 	level = stsi(NULL, 0, 0, 0);
 	if (level >= 1)
 		stsi_1_1_1(m, info);
-- 
2.6.4




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux