Skip to content

Commit

Permalink
bcma: signedness bug in bcma_get_next_core()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Aug 24, 2011
1 parent 152e585 commit 4e0d8cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bcma/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4e0d8cc

Please sign in to comment.