tty: serial_core: use more guard(mutex)
Simplify 4 more functions using guard(mutex): uart_get_info(),
console_store(), serial_core_add_one_port(), and
serial_core_register_port(). Especially console_store() is now much less
convoluted. In the others, we save some goto-s and even local variables
are dropped in some.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20241211074933.92973-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>