diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-11-18 10:19:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-25 20:31:32 +0300 |
commit | 2765852e74c8cfb5317cd22331800f00ab71ff46 (patch) | |
tree | 189a87cf127f8d019cd6ad7eb742b69f3d83525b /drivers/tty/serial | |
parent | 954a0881a9d4f92bd645ebb06a5f939a19c82056 (diff) | |
download | linux-2765852e74c8cfb5317cd22331800f00ab71ff46.tar.xz |
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: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211118071911.12059-5-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 1e738f265eea..a8750927f03c 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1685,17 +1685,13 @@ 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) |