* [patch 1/1] mca/mca-proc: Audit return code of create_proc_*
@ 2005-07-14 21:42 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-14 21:42 UTC (permalink / raw)
To: jejb; +Cc: linux-kernel, domen
[-- Attachment #1: return_code-drivers_mca_mca-proc --]
[-- Type: text/plain, Size: 1262 bytes --]
From: Christophe Lucas <clucas@rotomalug.org>
---
mca-proc.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
Index: quilt/drivers/mca/mca-proc.c
===================================================================
--- quilt.orig/drivers/mca/mca-proc.c
+++ quilt/drivers/mca/mca-proc.c
@@ -184,8 +184,14 @@ void __init mca_do_proc_init(void)
struct mca_device *mca_dev;
proc_mca = proc_mkdir("mca", &proc_root);
- create_proc_read_entry("pos",0,proc_mca,get_mca_info,NULL);
- create_proc_read_entry("machine",0,proc_mca,get_mca_machine_info,NULL);
+ node = create_proc_read_entry("pos",0,proc_mca,get_mca_info,NULL);
+ if (!node)
+ printk(KERN_WARNING "MCA: Unable to create mca /proc entry.\n");
+ node = create_proc_read_entry("machine",0,proc_mca,
+ get_mca_machine_info,NULL);
+ if (!node)
+ printk(KERN_WARNING
+ "MCA: Unable to create machine /proc entry.\n");
/* Initialize /proc/mca entries for existing adapters */
@@ -211,7 +217,8 @@ void __init mca_do_proc_init(void)
mca_read_proc, (void *)mca_dev);
if(node == NULL) {
- printk("Failed to allocate memory for MCA proc-entries!");
+ printk(KERN_WARNING
+ "Failed to allocate memory for MCA proc-entries!");
return;
}
}
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-14 22:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-14 21:42 [patch 1/1] mca/mca-proc: Audit return code of create_proc_* domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®