[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <jefxps8qm1.fsf@sykes.suse.de>
Date: Tue, 29 Jul 2008 20:58:14 +0200
From: Andreas Schwab <schwab@...e.de>
To: netdev@...r.kernel.org
Subject: Fix error checking in niu driver
The callers of niu_ethflow_to_class expect zero as error, but it returns
-1 instead.
Signed-off-by: Andreas Schwab <schwab@...e.de>
---
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 8ee7d7b..e4765b7 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -6417,7 +6417,7 @@ static int niu_ethflow_to_class(int flow_type, u64 *class)
*class = CLASS_CODE_SCTP_IPV6;
break;
default:
- return -1;
+ return 0;
}
return 1;
--
Andreas Schwab, SuSE Labs, schwab@...e.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists