Skip to content

Commit

Permalink
arm: dma: check clk_get() result
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasiliy Kulikov authored and Sascha Hauer committed Dec 3, 2010
1 parent 0ef5195 commit abebbb4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-imx/dma-v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit abebbb4

Please sign in to comment.