From: Dan Carpenter <error27@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Bill Pemberton <wfp5p@virginia.edu>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] usb/serial/ssu100: uninitialized variable
Date: Fri, 13 Aug 2010 14:38:11 +0200 [thread overview]
Message-ID: <20100813123811.GA31262@bicker> (raw)
GCC complains about the original code, because we're using an
unintialized variable "flag". I think we should be setting flag based
on the UART_LSR_BRK_ERROR_BITS but I'm not sure... I don't have this
hardware. Probably passing TTY_NORMAL is better than the current code?
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c
index 6e82d4f..494998c 100644
--- a/drivers/usb/serial/ssu100.c
+++ b/drivers/usb/serial/ssu100.c
@@ -563,7 +563,6 @@ static int ssu100_process_packet(struct tty_struct *tty,
char *packet, int len)
{
int i;
- char flag;
char *ch;
dbg("%s - port %d", __func__, port->number);
@@ -597,10 +596,10 @@ static int ssu100_process_packet(struct tty_struct *tty,
if (port->port.console && port->sysrq) {
for (i = 0; i < len; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch))
- tty_insert_flip_char(tty, *ch, flag);
+ tty_insert_flip_char(tty, *ch, TTY_NORMAL);
}
} else
- tty_insert_flip_string_fixed_flag(tty, ch, flag, len);
+ tty_insert_flip_string_fixed_flag(tty, ch, TTY_NORMAL, len);
return len;
}
next reply other threads:[~2010-08-13 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 12:38 Dan Carpenter [this message]
2010-08-13 12:58 ` [patch] usb/serial/ssu100: uninitialized variable Bill Pemberton
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=20100813123811.GA31262@bicker \
--to=error27@gmail.com \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=wfp5p@virginia.edu \
/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