[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061001133332.GA32354@havoc.gtf.org>
Date: Sun, 1 Oct 2006 09:33:32 -0400
From: Jeff Garzik <jeff@...zik.org>
To: chas@....nrl.navy.mil, netdev@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, Andrew Morton <akpm@...l.org>
Subject: [PATCH] atm/ambassador: fix return code bug
While auditing a 'may be used uninitialized' warning, I found a minor
bug: make_rate() has the standard error code convention -- zero for
success, negative errno on error -- but its return type is defined as
unsigned.
Change the return type to reflect reality.
Signed-off-by: Jeff Garzik <jeff@...zik.org>
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 4521a24..da599e6 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -915,8 +915,8 @@ #endif
/********** make rate (not quite as much fun as Horizon) **********/
-static unsigned int make_rate (unsigned int rate, rounding r,
- u16 * bits, unsigned int * actual) {
+static int make_rate (unsigned int rate, rounding r,
+ u16 * bits, unsigned int * actual) {
unsigned char exp = -1; // hush gcc
unsigned int man = -1; // hush gcc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists