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-Url: https://git.stricted.de/?a=commitdiff_plain;h=c454dee21d589476608957ca4f57feaabde62fab;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 f68e5f8e23ee..6318f7ddc1d4 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 {