tty: simplify tty_dev_name_to_number() using guard(mutex)
In tty_dev_name_to_number(), a guard can help to make the code easier to follow. Especially how 0 is returned in the successful case. So use a guard there. 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/20240805102046.307511-2-jirislaby@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment