Commit 8173dbc1 authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Greg Kroah-Hartman
Browse files

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: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240805102046.307511-2-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a2a3437
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment