[patch] staging: speakup: fix synth caching when synth init fails

Okash Khawaja okash.khawaja at gmail.com
Tue Jun 20 04:21:45 EDT 2017



> On 20 Jun 2017, at 09:16, Samuel Thibault <samuel.thibault at ens-lyon.org> wrote:
> 
> Okash Khawaja, on mar. 20 juin 2017 08:31:20 +0100, wrote:
>> 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: Okash Khawaja <okash.khawaja at gmail.com>
> 
> Reviewed-by: Samuel Thibault <samuel.thibault at ens-lyon.org>
> 
> (I guess you have tested it)

Yes tested it working after the patch. No obvious regressions :)

Thanks!


More information about the Speakup mailing list