]> Gentwo Git Trees - linux/.git/commit
serial: 8250: invert conditions in RSA functions
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:02:56 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2025 11:42:34 +0000 (13:42 +0200)
commita1efa7f624e6f119aea83dd3b249041c13087d51
treea4128f4580b61fd15f49c5d0fdb539fb4654761f
parent33d9ca5daa70b7f3d1f2f731ce56768bc07abf24
serial: 8250: invert conditions in RSA functions

The code can short-return in case something does not hold. So invert the
conditions and return in those cases immediately. This makes the code
flow more natural and less nested.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250611100319.186924-11-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c