Commit 8b9c012a authored by Sasha Levin's avatar Sasha Levin Committed by Greg Kroah-Hartman

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

Setting a 'silent' parameter without a synth would crash the kernel.
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6371f210
...@@ -212,6 +212,9 @@ void synth_start(void) ...@@ -212,6 +212,9 @@ void synth_start(void)
void spk_do_flush(void) void spk_do_flush(void)
{ {
if (!synth)
return;
speakup_info.flushing = 1; speakup_info.flushing = 1;
synth_buffer_clear(); synth_buffer_clear();
if (synth->alive) { if (synth->alive) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment