aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/6lowpan.c
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-10-15 22:21:55 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-10-25 01:56:25 -0400
commit4456c50d23d44352f4174a9a0cb75313d3150907 (patch)
treead5c28b0db9371623b1025e776c11f34e0c5e746 /net/bluetooth/6lowpan.c
parent15346a9c2875cae8e84c13196a2fc7428d9358d4 (diff)
Bluetooth: 6lowpan: remove unnecessary codes in give_skb_to_upper
netif_rx() only returns NET_RX_DROP and NET_RX_SUCCESS, not returns negative value Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/6lowpan.c')
-rw-r--r--net/bluetooth/6lowpan.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index c2e0d14433df..9b5c89b18718 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -249,19 +249,12 @@ static struct lowpan_dev *lookup_dev(struct l2cap_conn *conn)
249static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev) 249static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev)
250{ 250{
251 struct sk_buff *skb_cp; 251 struct sk_buff *skb_cp;
252 int ret;
253 252
254 skb_cp = skb_copy(skb, GFP_ATOMIC); 253 skb_cp = skb_copy(skb, GFP_ATOMIC);
255 if (!skb_cp) 254 if (!skb_cp)
256 return -ENOMEM; 255 return -ENOMEM;
257 256
258 ret = netif_rx(skb_cp); 257 return netif_rx(skb_cp);
259 if (ret < 0) {
260 BT_DBG("receive skb %d", ret);
261 return NET_RX_DROP;
262 }
263
264 return ret;
265} 258}
266 259
267static int process_data(struct sk_buff *skb, struct net_device *netdev, 260static int process_data(struct sk_buff *skb, struct net_device *netdev,