diff mbox

net/llc: storing negative error codes in unsigned short

Message ID 20100916181155.GB7867@bicker
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Dan Carpenter Sept. 16, 2010, 6:12 p.m. UTC
If the alloc_skb() fails then we return 65431 instead of -ENOBUFS
(-105). 

Signed-off-by: Dan Carpenter <error27@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Sept. 17, 2010, 5:39 a.m. UTC | #1
From: Dan Carpenter <error27@gmail.com>
Date: Thu, 16 Sep 2010 20:12:55 +0200

> If the alloc_skb() fails then we return 65431 instead of -ENOBUFS
> (-105). 
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied, thanks Dan.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index e4dae02..cf4aea3 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -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;