diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-02-01 11:43:31 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 23:55:42 +0400 |
commit | 291689fcfbf0046d17c83c36fc983400f499dec3 (patch) | |
tree | 812f2e620f9565b7ad60037fe15686f7e2ba2037 /drivers/net/wireless/ath/ath9k/hif_usb.c | |
parent | 910570b5f4dbf75b73389010704ca6442a767a41 (diff) | |
download | linux-291689fcfbf0046d17c83c36fc983400f499dec3.tar.xz |
ath9k: cleanup a min_t() cast
If the firmware was over 2G, it would cause memory corruption and the
system would die here. Obviously we all know the firmware isn't going
to be that large but static checkers get upset.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hif_usb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index f317515d8bf3..424aabb2c730 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -981,7 +981,7 @@ static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev) return -ENOMEM; while (len) { - transfer = min_t(int, len, 4096); + transfer = min_t(size_t, len, 4096); memcpy(buf, data, transfer); err = usb_control_msg(hif_dev->udev, |