Commit 2765852e authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

tty: serial, join uport checks in uart_port_shutdown()



There are two consequent checks of uport != NULL in
uart_port_shutdown(). Join these two under a single block.

De-multiline the comments when shuffling with them anyway.

Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211118071911.12059-5-jslaby@suse.cz


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 954a0881
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1685,18 +1685,14 @@ static void uart_port_shutdown(struct tty_port *port)
	 */
	wake_up_interruptible(&port->delta_msr_wait);

	/*
	 * Free the IRQ and disable the port.
	 */
	if (uport)
	if (uport) {
		/* Free the IRQ and disable the port. */
		uport->ops->shutdown(uport);

	/*
	 * Ensure that the IRQ handler isn't running on another CPU.
	 */
	if (uport)
		/* Ensure that the IRQ handler isn't running on another CPU. */
		synchronize_irq(uport->irq);
	}
}

static int uart_carrier_raised(struct tty_port *port)
{