public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch -next] bcma: signedness bug in bcma_get_next_core()
@ 2011-08-18 13:38 Dan Carpenter
  2011-08-20 12:23 ` Rafał Miłecki
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dan Carpenter @ 2011-08-18 13:38 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: open list:BROADCOM SPECIFIC..., kernel-janitors

The u32 would never be less than zero so the error handling would
break.  I changed it to int.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 0ea390f..1361d8d 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);
+		int mst_port_d = bcma_erom_get_mst_port(bus, eromptr);
 		if (mst_port_d < 0)
 			return -EILSEQ;
 	}

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-08-24 10:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 13:38 [patch -next] bcma: signedness bug in bcma_get_next_core() Dan Carpenter
2011-08-20 12:23 ` Rafał Miłecki
2011-08-20 12:59   ` walter harms
2011-08-20 13:31     ` Rafał Miłecki
2011-08-23 19:13   ` Dan Carpenter
2011-08-24 10:01     ` Rafał Miłecki
2011-08-24 10:17       ` Dan Carpenter
2011-08-23 19:15   ` [patch -next v2] " Dan Carpenter
2011-08-20 14:11 ` [patch -next] " walter harms
2011-08-20 14:17 ` Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox