* [PATCH 02/10] s390: sysinfo: check return value of create_proc_read_entry()
@ 2010-07-28 16:39 Kulikov Vasiliy
0 siblings, 0 replies; only message in thread
From: Kulikov Vasiliy @ 2010-07-28 16:39 UTC (permalink / raw)
To: kernel-janitors
Cc: Martin Schwidefsky, Heiko Carstens, linux390, Tejun Heo,
linux-s390, linux-kernel
create_proc_read_entry() may fail, if so return -ENOMEM.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-28 16:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 16:39 [PATCH 02/10] s390: sysinfo: check return value of create_proc_read_entry() Kulikov Vasiliy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).