From: Axel Lin Date: Fri, 16 Nov 2012 09:17:50 +0000 (+0800) Subject: misc: apds9802als: Fix the logic checking timeout in als_wait_for_data_ready() X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~85^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=644a9d3b66e6983c2c1f3b24c3006d49b184c871;p=pandora-kernel.git misc: apds9802als: Fix the logic checking timeout in als_wait_for_data_ready() In the case of timeout waiting for data ready, the retry variable is -1. This also fixes a bug: current code returns -ETIMEDOUT if latest retry success ( which means retry is 0 when exiting the while loop ). Signed-off-by: Axel Lin Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed