Skip to contentSkip to conversation

ieee802154: 6lowpan: fix drop return value

PATCH In review Alexander Aring 2 participants 2 messages Sep 2, 2015

Subsystems (2)
lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH 1/1 ieee802154: 6lowpan: fix drop return value

This patch changes the return value of lowpan packet receive handler to the correct NET_RX_DROP instead RX_DROP.

This issue was detected by sparse and reported from Marcel:
net/ieee802154/6lowpan/rx.c:329:32: expected int
net/ieee802154/6lowpan/rx.c:329:32: got restricted lowpan_rx_result ...

---
 net/ieee802154/6lowpan/rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/6lowpan/rx.c +1 -1
index 856052b..3c31980 100644
@@ -326,7 +326,7 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *wdev,
 	    lowpan_is_iphc(*skb_network_header(skb))) {
 		skb = skb_unshare(skb, GFP_ATOMIC);
 		if (!skb)
-			return RX_DROP;
+			return NET_RX_DROP;
 	}
 
 	return lowpan_invoke_rx_handlers(skb);
Signature · 1 line
2.5.1
#1 lore raw

Hi Alex,

Quoted 7 lines

This patch changes the return value of lowpan packet receive handler to the correct NET_RX_DROP instead RX_DROP.

This issue was detected by sparse and reported from Marcel:
net/ieee802154/6lowpan/rx.c:329:32: expected int
net/ieee802154/6lowpan/rx.c:329:32: got restricted lowpan_rx_result ...

Quoted 5 lines

---
net/ieee802154/6lowpan/rx.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel