Skip to content

Commit c454dee

Browse files
author
Jean Delvare
committed
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>
1 parent b0cbc86 commit c454dee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/i2c/algos/i2c-algo-pca.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
190190
int completed = 1;
191191
unsigned long timeout = jiffies + i2c_adap->timeout;
192192

193-
while (pca_status(adap) != 0xf8) {
193+
while ((state = pca_status(adap)) != 0xf8) {
194194
if (time_before(jiffies, timeout)) {
195195
msleep(10);
196196
} else {

0 commit comments

Comments
 (0)