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 <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
This commit is contained in:
Vasiliy Kulikov authored and Sascha Hauer committed 2010-12-03 11:05:12 +01:00
1 parent 0ef51953be
commit abebbb4680
1 file changed
+2
+2
View File
@@ -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 */