From: Roel Kluin Date: Sat, 28 Mar 2009 20:34:42 +0000 (+0100) Subject: i2c-algo-pcf: Handle timeout correctly X-Git-Tag: v2.6.30-rc1~635^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94d78e180c0323422854bc1718e657ac2d0cac1b;p=pandora-kernel.git i2c-algo-pcf: Handle timeout correctly 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 msg_num should be tested before the timeout. With the current order, you could exit with a timeout error while all the messages were successfully transferred. Signed-off-by: Roel Kluin Signed-off-by: Jean Delvare Acked-by: Eric Brower --- Reading git-diff-tree failed