* [PATCH] Staging: speakup: don't die if accessing sysfs without synth
@ 2014-05-27 23:08 Sasha Levin
2014-05-28 6:49 ` Samuel Thibault
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2014-05-27 23:08 UTC (permalink / raw)
To: w.d.hubbs, chris, kirk, samuel.thibault, gregkh
Cc: speakup, devel, linux-kernel, Sasha Levin
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Staging: speakup: don't die if accessing sysfs without synth
2014-05-27 23:08 [PATCH] Staging: speakup: don't die if accessing sysfs without synth Sasha Levin
@ 2014-05-28 6:49 ` Samuel Thibault
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2014-05-28 6:49 UTC (permalink / raw)
To: Sasha Levin; +Cc: w.d.hubbs, chris, kirk, gregkh, speakup, devel, linux-kernel
Sasha Levin, le Tue 27 May 2014 19:08:36 -0400, a écrit :
> Setting a 'silent' parameter without a synth would crash the kernel.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> 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
>
--
Samuel
Now I know someone out there is going to claim, "Well then, UNIX is intuitive,
because you only need to learn 5000 commands, and then everything else follows
from that! Har har har!"
(Andy Bates in comp.os.linux.misc, on "intuitive interfaces", slightly
defending Macs.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-28 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 23:08 [PATCH] Staging: speakup: don't die if accessing sysfs without synth Sasha Levin
2014-05-28 6:49 ` Samuel Thibault
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).