summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-02-25 21:47:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-07 16:11:14 -0800
commit0b8053fef6f71db8e09c7dcdf8fd1b2cd5d53756 (patch)
tree0070b29a0b6b12bbc916347849722e8655a412c5 /drivers/gpu
parent2958ccee3690717f711431b546d7f194d8fa4f8b (diff)
downloadlinux-0b8053fef6f71db8e09c7dcdf8fd1b2cd5d53756.tar.bz2
serial: ifx6x60: avoid uninitialized variable use
gcc warns about a potential use of an uninitialized variable in this driver: drivers/tty/serial/ifx6x60.c: In function 'ifx_spi_complete': drivers/tty/serial/ifx6x60.c:713:6: warning: 'more' may be used uninitialized in this function [-Wmaybe-uninitialized] if (more || ifx_dev->spi_more || queue_length > 0 || Unlike a lot of other such warnings, this one is correct and describes an actual problem in the handling of the "IFX_SPI_HEADER_F" result code. This appears to be a result from a restructuring of the driver that dates back to before it was merged in the kernel, so it's impossible to know where it went wrong. I also don't know what that result code means, so I have no idea if setting 'more' to zero is the correct solution, but at least it makes the behavior reproducible rather than depending on whatever happens to be on the kernel stack. This patch initializes the 'more' variable to zero in each of the three code paths that could result in undefined behavior before, which is more explicit than initializing it at the start of the function. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions