ti-st: use goto-failpath in st_core_init
authorJiri Slaby <jslaby@suse.cz>
Wed, 5 May 2021 09:19:13 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 14:57:17 +0000 (16:57 +0200)
commit303e8ebf5dcb802b016b2802825dbc7928f9a50a
tree55c4326123a2e6ae457b9c08f919d6795c933d2d
parentf6f19595a7efdaa0c196d7fa2b343b5588f94470
ti-st: use goto-failpath in st_core_init

Use the classic failpath handling using gotos in st_core_init. That way,
tty_unregister_ldisc needs not be repeated on two places.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210505091928.22010-21-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ti-st/st_core.c