i2c-algo-pca: Fix use of uninitialized variable in debug message
A recent change broke debugging of pca_xfer(), fix it. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
This commit is contained in:
parent
b0cbc861a3
commit
c454dee21d
|
@ -190,7 +190,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
|
|||
int completed = 1;
|
||||
unsigned long timeout = jiffies + i2c_adap->timeout;
|
||||
|
||||
while (pca_status(adap) != 0xf8) {
|
||||
while ((state = pca_status(adap)) != 0xf8) {
|
||||
if (time_before(jiffies, timeout)) {
|
||||
msleep(10);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue