Skip to contentSkip to conversation

net/llc: storing negative error codes in unsigned short

PATCH Applied Dan Carpenter 2 participants 2 messages Sep 16, 2010 – Sep 17, 2010

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

PATCH 1/1 net/llc: storing negative error codes in unsigned short

If the alloc_skb() fails then we return 65431 instead of -ENOBUFS (-105).

net/llc/llc_station.c +1 -1
index e4dae02..cf4aea3 100644
@@ -689,7 +689,7 @@ static void llc_station_rcv(struct sk_buff *skb)
 
 int __init llc_station_init(void)
 {
-	u16 rc = -ENOBUFS;
+	int rc = -ENOBUFS;
 	struct sk_buff *skb;
 	struct llc_station_state_ev *ev;