diff mbox

[03/10] sh: dma: check return value of create_proc_read_entry()

Message ID 1280335166-23225-1-git-send-email-segooon@gmail.com (mailing list archive)
State Accepted
Commit 32dfab3ced3a3d2bb0ac2ed6fd7ac395edf02e88
Headers show

Commit Message

Kulikov Vasiliy July 28, 2010, 4:39 p.m. UTC
None
diff mbox

Patch

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);