diff options
| author | Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> | 2026-06-01 01:08:04 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-17 14:54:56 +0200 |
| commit | a76acbaec9b8fd74413646984d2e3626d0543e39 (patch) | |
| tree | c0cecb1232b7ea8c80f9e6eb57b16785bee931a1 /drivers/accessibility | |
| parent | a21164f89e09e84f50f8954ea4b0f8cc55af2d0b (diff) | |
| download | linux-next-a76acbaec9b8fd74413646984d2e3626d0543e39.tar.gz linux-next-a76acbaec9b8fd74413646984d2e3626d0543e39.zip | |
accessibility: speakup: unregister tty ldisc on later init failures
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>
Diffstat (limited to 'drivers/accessibility')
| -rw-r--r-- | drivers/accessibility/speakup/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c index 0962741a2ca2..e9b7c2761f6f 100644 --- a/drivers/accessibility/speakup/main.c +++ b/drivers/accessibility/speakup/main.c @@ -2444,6 +2444,7 @@ error_kbdnotifier: mutex_lock(&spk_mutex); synth_release(); mutex_unlock(&spk_mutex); + spk_ttyio_unregister_ldisc(); speakup_kobj_exit(); error_kobjects: |
