Skip to content

Commit

Permalink
Bluetooth: 6lowpan: remove unnecessary codes in give_skb_to_upper
Browse files Browse the repository at this point in the history
netif_rx() only returns NET_RX_DROP and NET_RX_SUCCESS, not returns
negative value

Signed-off-by: Li RongQing <[email protected]>
Acked-by: Jukka Rissanen <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
Li RongQing authored and holtmann committed Oct 25, 2014
1 parent 15346a9 commit 4456c50
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions net/bluetooth/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,19 +249,12 @@ static struct lowpan_dev *lookup_dev(struct l2cap_conn *conn)
static int give_skb_to_upper(struct sk_buff *skb, struct net_device *dev)
{
struct sk_buff *skb_cp;
int ret;

skb_cp = skb_copy(skb, GFP_ATOMIC);
if (!skb_cp)
return -ENOMEM;

ret = netif_rx(skb_cp);
if (ret < 0) {
BT_DBG("receive skb %d", ret);
return NET_RX_DROP;
}

return ret;
return netif_rx(skb_cp);
}

static int process_data(struct sk_buff *skb, struct net_device *netdev,
Expand Down

0 comments on commit 4456c50

Please sign in to comment.