Skip to content

Commit

Permalink
Staging: speakup: &&/|| confusion in silent_store()
Browse files Browse the repository at this point in the history
Fix test: the branch is always taken.

Signed-off-by: Roel Kluin <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
RoelKluin authored and gregkh committed Jan 20, 2011
1 parent e71a7fd commit e7bf352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/speakup/kobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit e7bf352

Please sign in to comment.