]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: imx: initialize the local variable
authorHuang Shijie <b32955@freescale.com>
Thu, 29 Aug 2013 08:29:25 +0000 (16:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Aug 2013 21:11:28 +0000 (14:11 -0700)
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 <b32955@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index 2c13155bb3bc0fda6aa3c8189da8a24ef96e1949..a0ebbc9ce5cdbacc69cc8c240f8d9fd76e43ec12 100644 (file)
@@ -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;