提交 abebbb46 编写于 作者: V Vasiliy Kulikov 提交者: 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: NVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 0ef51953
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册