diff options
author | Dan Carpenter | 2015-06-01 12:55:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-06-12 16:58:33 -0700 |
commit | a14ef24b07b63669d58c16d836ddbadcce3e7ad0 (patch) | |
tree | a9f2d35e6f48f9d75b02cfe1718666fba98dce17 /drivers/w1/slaves | |
parent | fc368ea1ea00c9418d6f2c25cd4c0869f1a16d5f (diff) |
w1: fix for loop exit condition in w1_seq_show()
The W1_42_FINISHED_BYTE is 0xFF so the cast means the condition is
never true.
Fixes: d9411e57dc7f ('w1: Add support for DS28EA00 sequence to w1-therm')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/slaves')
-rw-r--r-- | drivers/w1/slaves/w1_therm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index d21e6864b06f..3351be667957 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c @@ -378,7 +378,7 @@ static ssize_t w1_seq_show(struct device *device, w1_write_8(sl->master, W1_42_COND_READ); rv = w1_read_block(sl->master, (u8 *)&rn, 8); reg_num = (struct w1_reg_num *) &rn; - if ((char)reg_num->family == W1_42_FINISHED_BYTE) + if (reg_num->family == W1_42_FINISHED_BYTE) break; if (sl->reg_num.id == reg_num->id) seq = i; |