diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wan/hdlc_x25.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index 8b7e5d2e2ac9..cbcbf6f0414c 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c | |||
@@ -163,15 +163,17 @@ static void x25_close(struct net_device *dev) | |||
163 | 163 | ||
164 | static int x25_rx(struct sk_buff *skb) | 164 | static int x25_rx(struct sk_buff *skb) |
165 | { | 165 | { |
166 | struct net_device *dev = skb->dev; | ||
167 | |||
166 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { | 168 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { |
167 | skb->dev->stats.rx_dropped++; | 169 | dev->stats.rx_dropped++; |
168 | return NET_RX_DROP; | 170 | return NET_RX_DROP; |
169 | } | 171 | } |
170 | 172 | ||
171 | if (lapb_data_received(skb->dev, skb) == LAPB_OK) | 173 | if (lapb_data_received(dev, skb) == LAPB_OK) |
172 | return NET_RX_SUCCESS; | 174 | return NET_RX_SUCCESS; |
173 | 175 | ||
174 | skb->dev->stats.rx_errors++; | 176 | dev->stats.rx_errors++; |
175 | dev_kfree_skb_any(skb); | 177 | dev_kfree_skb_any(skb); |
176 | return NET_RX_DROP; | 178 | return NET_RX_DROP; |
177 | } | 179 | } |