Skip to content
Commit 944c6ec9 authored by Mariusz Bialonczyk's avatar Mariusz Bialonczyk Committed by Phil Elwell
Browse files

w1: ds2413: fix state byte comparision

commit aacd152e

 upstream.

This commit is fixing a smatch warning:
drivers/w1/slaves/w1_ds2413.c:61 state_read() warn: impossible condition '(*buf == 255) => ((-128)-127 == 255)'
by creating additional u8 variable for the bus reading and comparision

Reported-by: default avatarkbuild test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 3856032a

 ("w1: ds2413: when the slave is not responding during read, select it again")
Signed-off-by: default avatarMariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92c98660
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment