Skip to contentSkip to conversation

Fix error checking in niu driver

PATCH Applied Andreas Schwab 2 participants 2 messages Jul 29, 2008 – Jul 30, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The callers of niu_ethflow_to_class expect zero as error, but it returns -1 instead.

---

drivers/net/niu.c +1 -1
index 8ee7d7b..e4765b7 100644
@@ -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;
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
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."