Skip to content

Commit

Permalink
serial: imx: initialize the local variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Huang Shijie authored and Greg Kroah-Hartman committed Aug 30, 2013
1 parent dd910d9 commit b09c74a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b09c74a

Please sign in to comment.