aboutsummaryrefslogtreecommitdiffstats
path: root/net/phonet/af_phonet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/phonet/af_phonet.c')
-rw-r--r--net/phonet/af_phonet.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index 4706b77e67bf..c6fffd946d42 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -195,11 +195,7 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
195 if (skb->pkt_type == PACKET_LOOPBACK) { 195 if (skb->pkt_type == PACKET_LOOPBACK) {
196 skb_reset_mac_header(skb); 196 skb_reset_mac_header(skb);
197 skb_orphan(skb); 197 skb_orphan(skb);
198 if (irq) 198 err = (irq ? netif_rx(skb) : netif_rx_ni(skb)) ? -ENOBUFS : 0;
199 netif_rx(skb);
200 else
201 netif_rx_ni(skb);
202 err = 0;
203 } else { 199 } else {
204 err = dev_hard_header(skb, dev, ntohs(skb->protocol), 200 err = dev_hard_header(skb, dev, ntohs(skb->protocol),
205 NULL, NULL, skb->len); 201 NULL, NULL, skb->len);
@@ -208,6 +204,8 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev,
208 goto drop; 204 goto drop;
209 } 205 }
210 err = dev_queue_xmit(skb); 206 err = dev_queue_xmit(skb);
207 if (unlikely(err > 0))
208 err = net_xmit_errno(err);
211 } 209 }
212 210
213 return err; 211 return err;