Commit 4e0d8cc1006b889909a87f824943bad9a56358e8

Authored by Dan Carpenter
Committed by John W. Linville
1 parent 152e585dc9

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -281,7 +281,7 @@
281 281  
282 282 /* get & parse master ports */
283 283 for (i = 0; i < ports[0]; i++) {
284   - u32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr);
  284 + s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr);
285 285 if (mst_port_d < 0)
286 286 return -EILSEQ;
287 287 }