[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1290791157-21096-1-git-send-email-segoon@openwall.com>
Date: Fri, 26 Nov 2010 20:05:55 +0300
From: Vasiliy Kulikov <segoon@...nwall.com>
To: kernel-janitors@...r.kernel.org
Cc: Russell King <linux@....linux.org.uk>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] arm: dma: check clk_get() result
clk_get() may return ERR_PTR(), if so propagate return code as
imx_dma_init() return code.
Signed-off-by: Vasiliy Kulikov <segoon@...nwall.com>
---
Cannot compile this driver, so it is not tested at all.
arch/arm/mach-imx/dma-v1.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c
index dcb24a9..e9f1769 100644
--- a/arch/arm/mach-imx/dma-v1.c
+++ b/arch/arm/mach-imx/dma-v1.c
@@ -821,6 +821,8 @@ static int __init imx_dma_init(void)
return 0;
dma_clk = clk_get(NULL, "dma");
+ if (IS_ERR(dma_clk))
+ return PTR_ERR(dma_clk);
clk_enable(dma_clk);
/* reset DMA module */
--
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