From: Huang Shijie Date: Thu, 29 Aug 2013 08:29:25 +0000 (+0800) Subject: serial: imx: initialize the local variable X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b09c74ae1263ea63b63dd65e6b6500686a3a5fe3;p=linux-beck.git serial: imx: initialize the local variable The slave_config is not initialized, so some of its fields may be set with random data which may causes the failure in the following dmaengine_prep_slave_sg(). This patch fixes this issue. Signed-off-by: Huang Shijie Acked-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 2c13155bb3bc..a0ebbc9ce5cd 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -979,7 +979,7 @@ static void imx_uart_dma_exit(struct imx_port *sport) static int imx_uart_dma_init(struct imx_port *sport) { - struct dma_slave_config slave_config; + struct dma_slave_config slave_config = {}; struct device *dev = sport->port.dev; int ret;