]> git.hungrycats.org Git - linux/commit
accessibility: speakup: unregister tty ldisc on later init failures
authorHaoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Sun, 31 May 2026 23:08:04 +0000 (01:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Sep 2026 12:31:48 +0000 (14:31 +0200)
commit9786c42df8efbaa524955d5abc6ec72b74da446b
treec7437746b905eeb1ac1d880baf5fe2cc6e20130e
parent8ec7271e05df7f7aef6ff8f1c8cb1848124d123f
accessibility: speakup: unregister tty ldisc on later init failures

commit a76acbaec9b8fd74413646984d2e3626d0543e39 upstream.

The ldisc registration is intentionally non-fatal, since some synth
drivers do not use tty/ldisc.  However, once speakup_init() continues
past the registration point and later fails, the init unwind path should
mirror speakup_exit() and call spk_ttyio_unregister_ldisc().

Add the missing unregister call to the error path after synth_release(),
matching the normal module exit cleanup order.

Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Fixes: e23a9b439ce9 ("staging: speakup: safely register and unregister ldisc")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260531230804.254962-16-samuel.thibault@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/accessibility/speakup/main.c