From: Dan Carpenter <error27@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "open list:BROADCOM SPECIFIC..." <linux-wireless@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: [patch -next] bcma: signedness bug in bcma_get_next_core()
Date: Thu, 18 Aug 2011 13:38:09 +0000 [thread overview]
Message-ID: <20110818133809.GG4786@shale.localdomain> (raw)
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;
}
next reply other threads:[~2011-08-18 13:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 13:38 Dan Carpenter [this message]
2011-08-20 12:23 ` [patch -next] bcma: signedness bug in bcma_get_next_core() 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110818133809.GG4786@shale.localdomain \
--to=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox