Skip to contentSkip to conversation

Audit return code of

PATCH RESEND In review Christophe Lucas 2 participants 2 messages Jul 12, 2005 – Jul 13, 2005

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

PATCH RESEND 19/23 Audit return code of

Description:
Audit return of create_proc_* functions.

arch/m68k/mac/iop.c +5 -1
Index: 2.6.13-rc1/arch/m68k/mac/iop.c
===================================================================
@@ -275,6 +275,7 @@ void __init iop_preinit(void)
 
 void __init iop_init(void)
 {
+	struct proc_dir_entry *proc_entry;
 	int i;
 
 	if (iop_scc_present) {
@@ -303,7 +304,10 @@ void __init iop_init(void)
 
 #if 0	/* Crashing in 2.4 now, not yet sure why.   --jmt */
 #ifdef CONFIG_PROC_FS
-	create_proc_info_entry("mac_iop", 0, &proc_root, iop_get_proc_info);
+	proc_entry = create_proc_info_entry("mac_iop", 0, 
+		&proc_root, iop_get_proc_info);
+	if (!proc_entry)
+		printk(KERN_WARNING "iop: Unable to create /proc entry.\n");
 #endif
 #endif
 }

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

#1 lore raw
Quoted 19 lines · Christophe Lucas

Description:
Audit return of create_proc_* functions.

Index: 2.6.13-rc1/arch/m68k/mac/iop.c
===================================================================

arch/m68k/mac/iop.c +1 -0
@@ -275,6 +275,7 @@ void __init iop_preinit(void)
 
 void __init iop_init(void)
 {
+	struct proc_dir_entry *proc_entry;
 	int i;
 
 	if (iop_scc_present) {

arch/m68k/mac/iop.c void __init iop_init(void) · line 312

Quoted 10 lines
arch/m68k/mac/iop.c +4 -1
@@ -303,7 +304,10 @@ void __init iop_init(void)
 
 #if 0	/* Crashing in 2.4 now, not yet sure why.   --jmt */
 #ifdef CONFIG_PROC_FS
-	create_proc_info_entry("mac_iop", 0, &proc_root, iop_get_proc_info);
+	proc_entry = create_proc_info_entry("mac_iop", 0, 
+		&proc_root, iop_get_proc_info);
+	if (!proc_entry)
+		printk(KERN_WARNING "iop: Unable to create /proc entry.\n");
 #endif
 #endif

This adds a warning about unused variable; not good.

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