소스 검색

ARM i.MX DMA: return gracefully on different socs

Code called from an initcall can be maybe called for
machines it's not intended for. So check for valid
machines and return gracefully if an incompatible machine
is found.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer 14 년 전
부모
커밋
8bffb77e19
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      arch/arm/mach-imx/dma-v1.c

+ 1 - 1
arch/arm/mach-imx/dma-v1.c

@@ -818,7 +818,7 @@ static int __init imx_dma_init(void)
 		imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR);
 	else
 #endif
-		BUG();
+		return 0;
 
 	dma_clk = clk_get(NULL, "dma");
 	clk_enable(dma_clk);