]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Staging: speakup: don't die if accessing sysfs without synth
authorSasha Levin <sasha.levin@oracle.com>
Tue, 27 May 2014 23:08:36 +0000 (19:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 May 2014 00:35:50 +0000 (17:35 -0700)
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>
drivers/staging/speakup/synth.c

index 0b3549bd909d0619a594155f91a3f18372eeb7be..172cf62b1aaffaf8faebe84df119b8b1e0ebd249 100644 (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) {