From: Luciano Coelho Date: Fri, 3 Jul 2009 05:25:08 +0000 (+0300) Subject: mac80211: minstrel: avoid accessing negative indices in rix_to_ndx() X-Git-Tag: v2.6.31-rc3~40^2~5^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3938b45c1c75e53d45eb65ac253f12e86239c9ba;p=pandora-kernel.git mac80211: minstrel: avoid accessing negative indices in rix_to_ndx() If rix is not found in mi->r[], i will become -1 after the loop. This value is eventually used to access arrays, so we were accessing arrays with a negative index, which is obviously not what we want to do. This patch fixes this potential problem. Signed-off-by: Luciano Coelho Acked-by: Felix Fietkau Signed-off-by: John W. Linville --- Reading git-diff-tree failed