From: Jiri Slaby Date: Thu, 31 Mar 2016 08:23:34 +0000 (+0200) Subject: TTY: serial/ifx6x60, initialize more X-Git-Tag: v5.15~13571^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eeeabba024191c810b83592578cfc6183c4059fa;p=platform%2Fkernel%2Flinux-starfive.git TTY: serial/ifx6x60, initialize more In ifx_spi_complete, 'more' is not initialized. It is set only if the status is clear and only if the header is parsed OK. If any of those is not true, 'more' can be used uninitialized in that function later. Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c index 2085a6c..d386346 100644 --- a/drivers/tty/serial/ifx6x60.c +++ b/drivers/tty/serial/ifx6x60.c @@ -651,7 +651,7 @@ static void ifx_spi_complete(void *ctx) struct ifx_spi_device *ifx_dev = ctx; int length; int actual_length; - unsigned char more; + unsigned char more = 0; unsigned char cts; int local_write_pending = 0; int queue_length;