From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] serial: clear entire struct in uart_get_info()
Date: Fri, 7 Sep 2012 09:46:14 +0300 [thread overview]
Message-ID: <20120907064613.GA12028@elgon.mountain> (raw)
There is a typo here, sizeof(retinfo) should be sizeof(*retinfo) to
clear the struct.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Only needed in linux-next.
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 137b25c..19993d8 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -640,7 +640,7 @@ static void uart_get_info(struct tty_port *port,
{
struct uart_port *uport = state->uart_port;
- memset(retinfo, 0, sizeof(retinfo));
+ memset(retinfo, 0, sizeof(*retinfo));
retinfo->type = uport->type;
retinfo->line = uport->line;
reply other threads:[~2012-09-07 6:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120907064613.GA12028@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-serial@vger.kernel.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