From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: imx: initialize the local variable
Date: Thu, 29 Aug 2013 16:29:25 +0800 [thread overview]
Message-ID: <1377764965-2000-1-git-send-email-b32955@freescale.com> (raw)
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>
---
drivers/tty/serial/imx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 2c13155..a0ebbc9 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;
--
1.7.1
next reply other threads:[~2013-08-29 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 8:29 Huang Shijie [this message]
2013-08-29 14:12 ` [PATCH] serial: imx: initialize the local variable Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377764965-2000-1-git-send-email-b32955@freescale.com \
--to=b32955@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).