[PATCH] sh: audit return code of create_proc_read_entry() From: Christophe Lucas Signed-off-by: Christophe Lucas Signed-off-by: Alexey Dobriyan Index: linux-kj/arch/sh/drivers/dma/dma-api.c =================================================================== --- linux-kj.orig/arch/sh/drivers/dma/dma-api.c 2005-10-11 18:36:38.000000000 +0400 +++ linux-kj/arch/sh/drivers/dma/dma-api.c 2005-10-11 18:38:00.000000000 +0400 @@ -265,10 +265,13 @@ void __exit unregister_dmac(struct dma_i static int __init dma_api_init(void) { + struct proc_dir_entry *ent; printk("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-api.c: unable to create /proc entry\n"); #endif return 0; Index: linux-kj/arch/sh/kernel/cpu/sh4/sq.c =================================================================== --- linux-kj.orig/arch/sh/kernel/cpu/sh4/sq.c 2005-10-11 18:36:38.000000000 +0400 +++ linux-kj/arch/sh/kernel/cpu/sh4/sq.c 2005-10-11 18:38:00.000000000 +0400 @@ -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);