Commit abebbb46 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Sascha Hauer

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: default avatarVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 0ef51953
...@@ -821,6 +821,8 @@ static int __init imx_dma_init(void) ...@@ -821,6 +821,8 @@ static int __init imx_dma_init(void)
return 0; return 0;
dma_clk = clk_get(NULL, "dma"); dma_clk = clk_get(NULL, "dma");
if (IS_ERR(dma_clk))
return PTR_ERR(dma_clk);
clk_enable(dma_clk); clk_enable(dma_clk);
/* reset DMA module */ /* reset DMA module */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment