diff options
-rw-r--r-- | drivers/staging/speakup/synth.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index 703553916097..a1ca68c76579 100644 --- a/drivers/staging/speakup/synth.c +++ b/drivers/staging/speakup/synth.c @@ -445,10 +445,15 @@ int synth_add(struct spk_synth *in_synth) mutex_unlock(&spk_mutex); return -1; } - synths[i++] = in_synth; - synths[i] = NULL; + if (in_synth->startup) status = do_synth_init(in_synth); + + if (!status) { + synths[i++] = in_synth; + synths[i] = NULL; + } + mutex_unlock(&spk_mutex); return status; } |