]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: speakup: &&/|| confusion in silent_store()
authorroel kluin <roel.kluin@gmail.com>
Mon, 3 Jan 2011 19:59:48 +0000 (11:59 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Jan 2011 20:06:07 +0000 (12:06 -0800)
Fix test: the branch is always taken.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/speakup/kobjects.c

index 408bb9b3303e89d7c0f95e1d8c25cb99af05cc94..07a7f5432597f4d88719850e15406435b9a9b412 100644 (file)
@@ -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';