From: Li RongQing Date: Thu, 16 Oct 2014 02:21:55 +0000 (+0800) Subject: Bluetooth: 6lowpan: remove unnecessary codes in give_skb_to_upper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4456c50d23d44352f4174a9a0cb75313d3150907;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann --- 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) 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,