]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
serial: 8250_core: use guard() in serial_unlink_irq_chain()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 14 Aug 2025 07:24:50 +0000 (09:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2025 10:46:26 +0000 (12:46 +0200)
commit9a2225f2a7214cc04a03a09768b19215a3fe4c16
tree40342d21d8d8cedcf068c9c867f0becaacfd6531
parentb339809edda15939e7d46b429c420c2bfe4ad946
serial: 8250_core: use guard() in serial_unlink_irq_chain()

Having all the new guards, use them in the 8250 code. This improves
readability, makes error handling easier, and marks locked portions of
code explicit.

serial_unlink_irq_chain() is done separately here because with the
guard() used, those BUG_ON()s can be switched WARN_ON()s as we can
actually handle the conditions and return (despite something went really
wrong).

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250814072456.182853-11-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_core.c