Skip to content

Commit 057b9fe

Browse files
Haoxiang Ligregkh
authored andcommitted
accessibility: speakup: unregister tty ldisc on later init failures
commit a76acba 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: e23a9b4 ("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>
1 parent c6662f9 commit 057b9fe

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/accessibility/speakup

drivers/accessibility/speakup/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,6 +2430,7 @@ static int __init speakup_init(void)
24302430
mutex_lock(&spk_mutex);
24312431
synth_release();
24322432
mutex_unlock(&spk_mutex);
2433+
spk_ttyio_unregister_ldisc();
24332434
speakup_kobj_exit();
24342435

24352436
error_kobjects:

0 commit comments

Comments
 (0)