From patchwork Thu Aug 18 13:38:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 1076602 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7IDePQu025735 for ; Thu, 18 Aug 2011 13:40:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755215Ab1HRNkW (ORCPT ); Thu, 18 Aug 2011 09:40:22 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:59585 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592Ab1HRNkV (ORCPT ); Thu, 18 Aug 2011 09:40:21 -0400 Received: by pzk37 with SMTP id 37so3022928pzk.1 for ; Thu, 18 Aug 2011 06:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=E4u9lArQQLKpF2owASOjr7SjzcjW2ySMx+Pxcn0unA0=; b=u9Rir7T1EnHJcj5Ry4RXRIHHbsj53DdeI/un0iwq2HQvXZBbOTxwO1E79GzOyek53V yHtYBeUlOwzcvEXu64RYqayUHlMi5s35cLzG4Iz8C2M+XMs00gmQzfUardgSu4Zh6CVv L1wohsxt8KolBSL+5qIAKU0Rq/CbUQZZuDJyo= Received: by 10.142.221.3 with SMTP id t3mr410228wfg.186.1313674820615; Thu, 18 Aug 2011 06:40:20 -0700 (PDT) Received: from shale.localdomain ([41.139.221.94]) by mx.google.com with ESMTPS id f20sm1004906wfl.9.2011.08.18.06.40.16 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 06:40:19 -0700 (PDT) Date: Thu, 18 Aug 2011 16:38:09 +0300 From: Dan Carpenter To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: "open list:BROADCOM SPECIFIC..." , kernel-janitors@vger.kernel.org Subject: [patch -next] bcma: signedness bug in bcma_get_next_core() Message-ID: <20110818133809.GG4786@shale.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 18 Aug 2011 13:40:25 +0000 (UTC) The u32 would never be less than zero so the error handling would break. I changed it to int. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }