From: Christophe Lucas Subject: [KJ] [patch 2.6.13-rc1 16/23][RESEND] sh64: Audit return code of create_proc_* Audit return of create_proc_* functions. Signed-off-by: Christophe Lucas --- kernel/process.c | 6 +++++- mm/fault.c | 7 +++++-- mm/ioremap.c | 6 +++++- 3 files changed, 15 insertions(+), 4 deletions(-) Index: quilt/arch/sh64/kernel/process.c =================================================================== --- quilt.orig/arch/sh64/kernel/process.c +++ quilt/arch/sh64/kernel/process.c @@ -953,7 +953,11 @@ asids_proc_info(char *buf, char **start, static int __init register_proc_asids(void) { - create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL); + struct proc_dir_entry *ent; + ent = create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL); + if (!ent) + printk(KERN_WARNING + "process: Unable to create asids /proc entry.\n"); return 0; } Index: quilt/arch/sh64/mm/fault.c =================================================================== --- quilt.orig/arch/sh64/mm/fault.c +++ quilt/arch/sh64/mm/fault.c @@ -592,8 +592,11 @@ tlb_proc_info(char *buf, char **start, o static int __init register_proc_tlb(void) { - create_proc_read_entry("tlb", 0, NULL, tlb_proc_info, NULL); - return 0; + struct proc_dir_entry *ent; + ent = create_proc_read_entry("tlb", 0, NULL, tlb_proc_info, NULL); + if (!ent) + printk(KERN_WARNING "fault.c: Unable to create tlb /proc entry.\n"); + return 0; } __initcall(register_proc_tlb); Index: quilt/arch/sh64/mm/ioremap.c =================================================================== --- quilt.orig/arch/sh64/mm/ioremap.c +++ quilt/arch/sh64/mm/ioremap.c @@ -461,7 +461,11 @@ ioremap_proc_info(char *buf, char **star static int __init register_proc_onchip(void) { #ifdef CONFIG_PROC_FS - create_proc_read_entry("io_map",0,0, ioremap_proc_info, &shmedia_iomap); + struct proc_dir_entry *ent; + ent = create_proc_read_entry("io_map",0,0, + ioremap_proc_info, &shmedia_iomap); + if (!ent) + printk(KERN_WARNING "ioremap.c: Unable to create /proc entry.\n"); #endif return 0; }