From: Vasiliy Kulikov Date: Fri, 26 Nov 2010 17:05:55 +0000 (+0300) Subject: arm: dma: check clk_get() result X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=abebbb468050ad63caed55fdb7a6bfce732e9a7f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 --- 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 */