Staging: speakup: don't die if accessing sysfs without synth

Setting a 'silent' parameter without a synth would crash the kernel.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sasha Levin 2014-05-27 19:08:36 -04:00 committed by Greg Kroah-Hartman
parent 6371f2105a
commit 8b9c012a42
1 changed files with 3 additions and 0 deletions

View File

@ -212,6 +212,9 @@ void synth_start(void)
void spk_do_flush(void)
{
if (!synth)
return;
speakup_info.flushing = 1;
synth_buffer_clear();
if (synth->alive) {