diff options
author | roel kluin <roel.kluin@gmail.com> | 2011-01-03 11:59:48 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-20 12:06:07 -0800 |
commit | e7bf352fcd85c33b0805da891fc97fea8b5e996e (patch) | |
tree | c9992869fdd493a198fee0df104a657b0dfed714 /drivers/staging | |
parent | e71a7fd259943a2c2e11484880c80248ad139fe5 (diff) | |
download | linux-e7bf352fcd85c33b0805da891fc97fea8b5e996e.tar.gz linux-e7bf352fcd85c33b0805da891fc97fea8b5e996e.tar.bz2 linux-e7bf352fcd85c33b0805da891fc97fea8b5e996e.zip |
Staging: speakup: &&/|| confusion in silent_store()
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | 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 408bb9b3303e..07a7f5432597 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'; |