summaryrefslogtreecommitdiffstats
path: root/drivers/net/cris
diff options
context:
space:
mode:
authorDan Carpenter2012-10-10 20:13:12 +0200
committerJohn W. Linville2012-10-15 20:45:34 +0200
commit3e4f319dacc60c1b4537b85329d393ad18bf7501 (patch)
tree20f78805a34fe1a524127c6da84954c5f2a09dfd /drivers/net/cris
parentbrcmfmac: set dongle mode accordingly when interface up (diff)
downloadkernel-qcow2-linux-3e4f319dacc60c1b4537b85329d393ad18bf7501.tar.gz
kernel-qcow2-linux-3e4f319dacc60c1b4537b85329d393ad18bf7501.tar.xz
kernel-qcow2-linux-3e4f319dacc60c1b4537b85329d393ad18bf7501.zip
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 'drivers/net/cris')
0 files changed, 0 insertions, 0 deletions