n_gsm: use goto-failpaths in gsm_init
authorJiri Slaby <jslaby@suse.cz>
Wed, 5 May 2021 09:19:08 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 14:57:16 +0000 (16:57 +0200)
commit839e0f226d1c1d216ac3841b4710810080392c16
tree02e980cb44c0e4b8cd6652833935d9cac8572429
parentfbadf70a8053b3dce78a45997ae55651693a2a81
n_gsm: use goto-failpaths in gsm_init

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

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210505091928.22010-16-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c