From: Albert Herranz Date: Thu, 17 Dec 2009 08:33:41 +0000 (+0000) Subject: powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg X-Git-Tag: v2.6.33-rc2~25^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=698cd335a782561b79504d4e98c7df62b08e7abd;p=pandora-kernel.git powerpc/gamecube/wii: Fix off-by-one error in ugecon/usbgecko_udbg The retry logic in ug_putc() is broken. If the TX fifo is not ready and the counter runs out it will have a value of -1 and no transfer should be attempted. Also, a counter with a value of 0 means that the TX fifo got ready in the last try and the transfer should be attempted. Reported-by: "Juha Leppanen" Signed-off-by: "Juha Leppanen" Signed-off-by: Albert Herranz Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed