mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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;
|
int completed = 1;
|
||||||
unsigned long timeout = jiffies + i2c_adap->timeout;
|
unsigned long timeout = jiffies + i2c_adap->timeout;
|
||||||
|
|
||||||
while (pca_status(adap) != 0xf8) {
|
while ((state = pca_status(adap)) != 0xf8) {
|
||||||
if (time_before(jiffies, timeout)) {
|
if (time_before(jiffies, timeout)) {
|
||||||
msleep(10);
|
msleep(10);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user