mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
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 <segoon@openwall.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
0ef51953be
commit
abebbb4680
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user