From abebbb468050ad63caed55fdb7a6bfce732e9a7f Mon Sep 17 00:00:00 2001 From: Vasiliy Kulikov Date: Fri, 26 Nov 2010 20:05:55 +0300 Subject: 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 Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/dma-v1.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-imx/dma-v1.c') diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index dcb24a90998c..e9f1769b49f5 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 */ -- cgit v1.2.2