From: Sasha Levin <sasha.levin@oracle.com>
To: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca,
samuel.thibault@ens-lyon.org, gregkh@linuxfoundation.org
Cc: speakup@braille.uwo.ca, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Sasha Levin <sasha.levin@oracle.com>
Subject: [PATCH] Staging: speakup: don't die if accessing sysfs without synth
Date: Tue, 27 May 2014 19:08:36 -0400 [thread overview]
Message-ID: <1401232116-31740-1-git-send-email-sasha.levin@oracle.com> (raw)
Setting a 'silent' parameter without a synth would crash the kernel.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/staging/speakup/synth.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 0b3549b..172cf62 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) {
--
1.7.10.4
next reply other threads:[~2014-05-27 23:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 23:08 Sasha Levin [this message]
2014-05-28 6:49 ` [PATCH] Staging: speakup: don't die if accessing sysfs without synth Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401232116-31740-1-git-send-email-sasha.levin@oracle.com \
--to=sasha.levin@oracle.com \
--cc=chris@the-brannons.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@braille.uwo.ca \
--cc=w.d.hubbs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).