From faccffd54fa78cc094740ccc902e0a1189c61c27 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 25 Feb 2009 21:26:21 +0100 Subject: [PATCH] i2c: Timeouts reach -1 commit a746b578d8406b2db0e9f0d040061bc1f78433cf upstream With a postfix decrement these timeouts reach -1 rather than 0, but after the loop it is tested whether they have become 0. As pointed out by Jean Delvare, the condition we are waiting for should also be tested before the timeout. With the current order, you could exit with a timeout error while the job is actually done. Signed-off-by: Roel Kluin Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed