Skip to contentSkip to conversation

staging: speakup: Remove unnecessary test in if condition

PATCH New Amitoj Kaur Chawla 1 participant 1 message Feb 24, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: speakup: Remove unnecessary test in if condition

Remove unnecessary test on synth->alive since it has already been tested previously.

This fixes the following smatch warning:
drivers/staging/speakup/synth.c:182 spk_synth_is_alive_restart() warn:
we tested 'synth->alive' before and it was 'false'

---
 drivers/staging/speakup/synth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/synth.c +1 -1
index 01eddab..4f462c3 100644
@@ -179,7 +179,7 @@ int spk_synth_is_alive_restart(struct spk_synth *synth)
 {
 	if (synth->alive)
 		return 1;
-	if (!synth->alive && spk_wait_for_xmitr() > 0) {
+	if (spk_wait_for_xmitr() > 0) {
 		/* restart */
 		synth->alive = 1;
 		synth_printf("%s", synth->init);
Signature · 1 line
1.9.1