Messages in this thread Patch in this message | | | Date | Thu, 14 Jul 2005 23:42:57 +0200 | From | domen@coderock ... | Subject | [patch 1/1] mca/mca-proc: Audit return code of create_proc_* |
| |
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; } } -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |