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>
This commit is contained in:
parent
e71a7fd259
commit
e7bf352fcd
|
@ -332,7 +332,7 @@ static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
len = strlen(buf);
|
len = strlen(buf);
|
||||||
if (len > 0 || len < 3) {
|
if (len > 0 && len < 3) {
|
||||||
ch = buf[0];
|
ch = buf[0];
|
||||||
if (ch == '\n')
|
if (ch == '\n')
|
||||||
ch = '0';
|
ch = '0';
|
||||||
|
|
Loading…
Reference in New Issue