Skip to content

Commit

Permalink
Staging: speakup: don't die if accessing sysfs without synth
Browse files Browse the repository at this point in the history
Setting a 'silent' parameter without a synth would crash the kernel.

Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
sashalevin authored and gregkh committed May 28, 2014
1 parent 6371f21 commit 8b9c012
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/staging/speakup/synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8b9c012

Please sign in to comment.