summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorgregkh@linuxfoundation.org <gregkh@linuxfoundation.org>2013-08-30 14:12:21 -0700
committerJason Liu <r64343@freescale.com>2013-10-30 09:55:16 +0800
commitbf704d4509630811e1a65d5a3ae22363e3b0b110 (patch)
treea969116265e2e11c964e2f7ac218e67a0adfffd4 /drivers/tty
parentd23155dc1e31d9d4b78f481918cdda6ef30e0e63 (diff)
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 <b32955@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c2
1 files changed, 1 insertions, 1 deletions
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;