From: Jean Delvare Date: Mon, 13 Apr 2009 15:02:13 +0000 (+0200) Subject: i2c-algo-pca: Fix use of uninitialized variable in debug message X-Git-Tag: v2.6.30-rc2~78^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c454dee21d589476608957ca4f57feaabde62fab;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Jean Delvare Acked-by: Wolfram Sang --- diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index f68e5f8..6318f7d 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c @@ -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 {