aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/synth.c
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-05-27 19:08:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 17:35:50 -0700
commit8b9c012a425b23c1df52cc1ddfec8259035c6754 (patch)
tree932e1f6996c3482afdf033fec451a87dddc25694 /drivers/staging/speakup/synth.c
parentStaging: rtl8192u: r8180_93cx6.c Added missing spaces (diff)
downloadlinux-dev-8b9c012a425b23c1df52cc1ddfec8259035c6754.tar.xz
linux-dev-8b9c012a425b23c1df52cc1ddfec8259035c6754.zip
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>
Diffstat (limited to 'drivers/staging/speakup/synth.c')
-rw-r--r--drivers/staging/speakup/synth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 0b3549bd909d..172cf62b1aaf 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -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) {