From: Christophe Lucas <[EMAIL PROTECTED]>

Audit return of create_proc_* functions.

Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---
 ioport.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

Index: quilt/arch/sparc/kernel/ioport.c
===================================================================
--- quilt.orig/arch/sparc/kernel/ioport.c
+++ quilt/arch/sparc/kernel/ioport.c
@@ -725,7 +725,16 @@ _sparc_find_resource(struct resource *ro
 void register_proc_sparc_ioport(void)
 {
 #ifdef CONFIG_PROC_FS
-       create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap);
-       
create_proc_read_entry("dvma_map",0,NULL,_sparc_io_get_info,&_sparc_dvma);
+       struct proc_dir_entry *ent;
+       ent = create_proc_read_entry("io_map",0,NULL,
+               _sparc_io_get_info,&sparc_iomap);
+       if (!ent)
+               printk(KERN_WARNING 
+                       "ioport.c: Unable to create io_map /proc entry.\n");
+       ent = create_proc_read_entry("dvma_map",0,NULL,
+               _sparc_io_get_info,&_sparc_dvma);
+       if (!ent)
+               printk(KERN_WARNING 
+                       "ioport.c: Unable to create dvma_map /proc entry.\n");
 #endif
 }

--
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to