summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/scan.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-08-23 21:15:35 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-08-24 20:41:44 +0200
commit4e0d8cc1006b889909a87f824943bad9a56358e8 (patch)
tree0966130d351e6eab22bb635ad3c9704e23919c23 /drivers/bcma/scan.c
parentath9k: fix MGMT packets when using TKIP (diff)
downloadlinux-4e0d8cc1006b889909a87f824943bad9a56358e8.tar.xz
linux-4e0d8cc1006b889909a87f824943bad9a56358e8.zip
bcma: signedness bug in bcma_get_next_core()
The u32 would never be less than zero so the error handling would break. I changed it to s32 to match how bcma_erom_get_mst_port() is declared. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/scan.c')
-rw-r--r--drivers/bcma/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 0ea390f9aa9e..cad994857683 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -281,7 +281,7 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
/* get & parse master ports */
for (i = 0; i < ports[0]; i++) {
- u32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr);
+ s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr);
if (mst_port_d < 0)
return -EILSEQ;
}