From: roel kluin Date: Mon, 3 Jan 2011 19:59:48 +0000 (-0800) Subject: Staging: speakup: &&/|| confusion in silent_store() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e7bf352fcd85c33b0805da891fc97fea8b5e996e;p=linux-beck.git Staging: speakup: &&/|| confusion in silent_store() Fix test: the branch is always taken. Signed-off-by: Roel Kluin Cc: Andrew Morton Cc: stable Signed-off-by: Greg Kroah-Hartman --- 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';