summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-10-10 22:13:12 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-15 22:45:34 +0400
commit3e4f319dacc60c1b4537b85329d393ad18bf7501 (patch)
tree20f78805a34fe1a524127c6da84954c5f2a09dfd /net
parent5dd161ff7b46029c9da4f4ef8b214b8ba4316445 (diff)
downloadlinux-3e4f319dacc60c1b4537b85329d393ad18bf7501.tar.xz
brcmfmac: fix end of loop check (signedness bug)
The problem here is that we loop until "remained_buf_len" is less than zero, but since it is unsigned, it never is. "remained_buf_len" has to be large enough to hold the value from "mgmt_ie_buf_len". That variable is type u32, but it only holds small values so I have changed to both variables to int. Also I removed the bogus initialization from "mgmt_ie_buf_len" so that GCC can detect if it is used unitialized. I moved the declaration of "remained_buf_len" closer to where it is used so it's easier to read. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions