[PATCH 13/26] Staging: speakup: &&/|| confusion in silent_store()

Greg Kroah-Hartman gregkh at suse.de
Mon Jan 31 16:31:36 UTC 2011


From: roel kluin <roel.kluin at gmail.com>

Fix test: the branch is always taken.

Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: stable <stable at kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/staging/speakup/kobjects.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
index 408bb9b..07a7f54 100644
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -332,7 +332,7 @@ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr,
 	unsigned long flags;
 
 	len = strlen(buf);
-	if (len > 0 || len < 3) {
+	if (len > 0 && len < 3) {
 		ch = buf[0];
 		if (ch == '\n')
 			ch = '0';
-- 
1.7.1




More information about the devel mailing list