From: roy.qing.li@gmail.com
To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org,
gustavo@padovan.org, johan.hedberg@gmail.com
Subject: [PATCH] Bluetooth: 6lowpan: remove unnecessary codes in give_skb_to_upper
Date: Thu, 16 Oct 2014 10:21:55 +0800 [thread overview]
Message-ID: <1413426115-17077-1-git-send-email-roy.qing.li@gmail.com> (raw)
From: Li RongQing <roy.qing.li@gmail.com>
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>
---
net/bluetooth/6lowpan.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index c2e0d14..9b5c89b 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,
--
1.7.10.4
next reply other threads:[~2014-10-16 2:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 2:21 roy.qing.li [this message]
2014-10-17 13:10 ` [PATCH] Bluetooth: 6lowpan: remove unnecessary codes in give_skb_to_upper Jukka Rissanen
2014-10-17 14:08 ` Marcel Holtmann
2014-10-17 14:20 ` Jukka Rissanen
2014-10-17 15:01 ` Alexander Aring
2014-10-17 14:11 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413426115-17077-1-git-send-email-roy.qing.li@gmail.com \
--to=roy.qing.li@gmail.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox