Skip to contentSkip to conversation

Audit return code of

PATCH RESEND Superseded Christophe Lucas 1 participant 1 message Jul 8, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 5/23 Audit return code of

Description:
Audit return of create_proc_* functions.

drivers/block/cpqarray.c +6 -1
Index: 2.6.13-rc1/drivers/block/cpqarray.c
===================================================================
@@ -213,13 +213,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");
 }
 
 /*

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors