Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e4dd8bca authored by Okash Khawaja's avatar Okash Khawaja Committed by Greg Kroah-Hartman
Browse files

staging: speakup: fix synth caching when synth init fails



synths[] array caches currently loaded synths. synth_add checks
synths[] before adding a new one. It however ignores the result of
do_synth_init. So when do_synth_init fails, the failed synth is still
cached. Since, as a result module loading fails too, synth_remove -
which is responsible for removing the cached synth - is never called.
Next time the failing synth is added again it succeeds because
synth_add finds it cached inside synths[].

This patch fixes this by caching a synth only after do_synth_init
succeeds.

Signed-off-by: default avatarOkash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eebdd3f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment