lkml.org 
[lkml]   [2005]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 1/2] block/cpqarray: Audit return code of create_proc_*
From: Christophe Lucas <clucas@rotomalug.org>


Audit return of create_proc_* functions.

Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
cpqarray.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)

Index: quilt/drivers/block/cpqarray.c
===================================================================
--- quilt.orig/drivers/block/cpqarray.c
+++ quilt/drivers/block/cpqarray.c
@@ -212,13 +212,18 @@ static struct proc_dir_entry *proc_array
*/
static void __init ida_procinit(int i)
{
+ struct proc_dir_entry *ent;
+
if (proc_array == NULL) {
proc_array = proc_mkdir("cpqarray", proc_root_driver);
if (!proc_array) return;
}

- create_proc_read_entry(hba[i]->devname, 0, proc_array,
+ ent = create_proc_read_entry(hba[i]->devname, 0, proc_array,
ida_proc_get_info, hba[i]);
+ if (!ent)
+ printk(KERN_WARNING
+ "cpqarray: Unable to create /proc entry.\n");
}

/*
--
-
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/

\
 
 \ /
  Last update: 2005-07-15 00:31    [W:0.073 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site