[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1280335147-23185-1-git-send-email-segooon@gmail.com>
Date: Wed, 28 Jul 2010 20:39:07 +0400
From: Kulikov Vasiliy <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
linux390@...ibm.com, Tejun Heo <tj@...nel.org>,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 02/10] s390: sysinfo: check return value of create_proc_read_entry()
create_proc_read_entry() may fail, if so return -ENOMEM.
Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
---
arch/s390/kernel/sysinfo.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index a0ffc77..db358e6 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -231,9 +231,8 @@ static int proc_read_sysinfo(char *page, char **start,
static __init int create_proc_sysinfo(void)
{
- create_proc_read_entry("sysinfo", 0444, NULL,
- proc_read_sysinfo, NULL);
- return 0;
+ return create_proc_read_entry("sysinfo", 0444, NULL,
+ proc_read_sysinfo, NULL) ? 0 : -ENOMEM;
}
device_initcall(create_proc_sysinfo);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists