tty: serial: pl011: explicitly initialize the flags variable
Silence the following gcc warning: drivers/tty/serial/amba-pl011.c: In function ‘pl011_console_write’: ./include/linux/spinlock.h:260:3: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized] _raw_spin_unlock_irqrestore(lock, flags); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/tty/serial/amba-pl011.c:2214:16: note: ‘flags’ was declared here unsigned long flags; ^~~~~ The code is correct. Thus, initializing flags to zero doesn't change the behavior and resolves the warning. Signed-off-by:Kurt Kanzenbach <kurt@linutronix.de> Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Loading
Please register or sign in to comment