From: Christophe Lucas Subject: [KJ] [patch 2.6.13-rc1 13/23][RESEND] arch/sh: Audit return code of create_proc_* Audit return of create_proc_* functions. Signed-off-by: Christophe Lucas --- drivers/dma/dma-api.c | 7 +++++-- kernel/cpu/sh4/sq.c | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) Index: quilt/arch/sh/drivers/dma/dma-api.c =================================================================== --- quilt.orig/arch/sh/drivers/dma/dma-api.c +++ quilt/arch/sh/drivers/dma/dma-api.c @@ -265,10 +265,13 @@ void __exit unregister_dmac(struct dma_i static int __init dma_api_init(void) { - printk("DMA: Registering DMA API.\n"); + struct proc_dir_entry *ent; + printk(KERN_INFO "DMA: Registering DMA API.\n"); #ifdef CONFIG_PROC_FS - create_proc_read_entry("dma", 0, 0, dma_read_proc, 0); + ent = create_proc_read_entry("dma", 0, 0, dma_read_proc, 0); + if (!ent) + printk(KERN_WARNING "dma: Unable to create /proc entry.\n"); #endif return 0; Index: quilt/arch/sh/kernel/cpu/sh4/sq.c =================================================================== --- quilt.orig/arch/sh/kernel/cpu/sh4/sq.c +++ quilt/arch/sh/kernel/cpu/sh4/sq.c @@ -423,10 +423,14 @@ static struct miscdevice sq_dev = { static int __init sq_api_init(void) { + struct proc_dir_entry *ent; printk(KERN_NOTICE "sq: Registering store queue API.\n"); #ifdef CONFIG_PROC_FS - create_proc_read_entry("sq_mapping", 0, 0, sq_mapping_read_proc, 0); + ent = create_proc_read_entry("sq_mapping", 0, 0, + sq_mapping_read_proc, 0); + if (!ent) + printk(KERN_WARNING "sq: Unable to create /proc entry.\n"); #endif return misc_register(&sq_dev);