serial: imx: initialize the local variable
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/tty/serial/imx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/imx.c +1 -1
@@ -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;
Signature · 1 line
1.7.1
PATCH 1/1 serial: imx: initialize the local variable
Quoted 7 lines · Huang Shijie
The
slave_configis not initialized, so some of its fields may be set with random data which may causes the failure in the followingdmaengine_prep_slave_sg().This patch fixes this issue.
Signed-off-by Huang Shijie <[email protected]>
Acked-by Shawn Guo <[email protected]>
Quoted 21 lines
--- drivers/tty/serial/imx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/tty/serial/imx.c +1
-1@@ -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;Signature · 1 line
1.7.1