OSDN Git Service

ath9k_hw: min_t() casts u32 to int
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Oct 2011 07:28:23 +0000 (10:28 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Nov 2011 20:53:57 +0000 (15:53 -0500)
commit48ef5c427ac2cfd12c150b38263d3ebb0d989647
tree1a55cd4b28046dd4ed05f6892667695228823b65
parent59034591029e9f3b691fe02ff60938556dba5683
ath9k_hw: min_t() casts u32 to int

The code here treats very large values of "limit" as less than
MAX_POWER_RATE because of the cast to int.  We should do the compare
as u32 instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c