diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2010-11-26 12:05:55 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-03 05:05:12 -0500 |
commit | abebbb468050ad63caed55fdb7a6bfce732e9a7f (patch) | |
tree | bb2e27882809fb35c9e1c51d736e816cf3b81b1e /arch/arm/mach-imx/dma-v1.c | |
parent | 0ef51953be84cf910cdf5d9a6b8ccb75fd3dd10c (diff) |
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>
Diffstat (limited to 'arch/arm/mach-imx/dma-v1.c')
-rw-r--r-- | arch/arm/mach-imx/dma-v1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index dcb24a90998c..e9f1769b49f5 100644 --- a/arch/arm/mach-imx/dma-v1.c +++ b/arch/arm/mach-imx/dma-v1.c | |||
@@ -821,6 +821,8 @@ static int __init imx_dma_init(void) | |||
821 | return 0; | 821 | return 0; |
822 | 822 | ||
823 | dma_clk = clk_get(NULL, "dma"); | 823 | dma_clk = clk_get(NULL, "dma"); |
824 | if (IS_ERR(dma_clk)) | ||
825 | return PTR_ERR(dma_clk); | ||
824 | clk_enable(dma_clk); | 826 | clk_enable(dma_clk); |
825 | 827 | ||
826 | /* reset DMA module */ | 828 | /* reset DMA module */ |