[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1280335166-23225-1-git-send-email-segooon@gmail.com>
Date: Wed, 28 Jul 2010 20:39:26 +0400
From: Kulikov Vasiliy <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: Paul Mundt <lethal@...ux-sh.org>, Tejun Heo <tj@...nel.org>,
linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 03/10] sh: dma: check return value of create_proc_read_entry()
create_proc_read_entry() may fail, if so return -ENOMEM.
Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
---
arch/sh/drivers/dma/dma-api.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
index 4a27722..f46848f 100644
--- a/arch/sh/drivers/dma/dma-api.c
+++ b/arch/sh/drivers/dma/dma-api.c
@@ -412,8 +412,8 @@ EXPORT_SYMBOL(unregister_dmac);
static int __init dma_api_init(void)
{
printk(KERN_NOTICE "DMA: Registering DMA API.\n");
- create_proc_read_entry("dma", 0, 0, dma_read_proc, 0);
- return 0;
+ return create_proc_read_entry("dma", 0, 0, dma_read_proc, 0)
+ ? 0 : -ENOMEM;
}
subsys_initcall(dma_api_init);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists