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 v2] bcma: signedness bug in bcma_get_next_core()
Date: Tue, 23 Aug 2011 19:15:35 +0000 [thread overview]
Message-ID: <20110823191535.GL12248@shale.localdomain> (raw)
In-Reply-To: <CACna6rzwxA=OzQQ_VknsSq8BXXoH8U=GpdfkRTBWjFSNSjwsAA@mail.gmail.com>
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>
---
v2: the first version used "int" instead of "s32".
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 0ea390f..cad9948 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;
}
next prev parent reply other threads:[~2011-08-23 19:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Dan Carpenter [this message]
2011-08-20 14:11 ` 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=20110823191535.GL12248@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