summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/tvlv.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-07-17 21:04:03 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-10-30 11:11:37 +0100
commit1ad5bcb2a032262170fdc508abfa0acb0565e2b5 (patch)
tree4c5e313c22aa50eddf909ebf7974ec3c32670dc8 /net/batman-adv/tvlv.c
parent8def0be82dd1507bcdc5fd35d12e35ace1e39dff (diff)
downloadop-kernel-dev-1ad5bcb2a032262170fdc508abfa0acb0565e2b5.zip
op-kernel-dev-1ad5bcb2a032262170fdc508abfa0acb0565e2b5.tar.gz
batman-adv: Consume skb in batadv_send_skb_to_orig
Sending functions in Linux consume the supplied skbuff. Doing the same in batadv_send_skb_to_orig avoids the hack of returning -1 (-EPERM) to signal the caller that he is responsible for cleaning up the skb. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/tvlv.c')
-rw-r--r--net/batman-adv/tvlv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/batman-adv/tvlv.c b/net/batman-adv/tvlv.c
index 77654f0..a783420 100644
--- a/net/batman-adv/tvlv.c
+++ b/net/batman-adv/tvlv.c
@@ -600,7 +600,6 @@ void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src,
unsigned char *tvlv_buff;
unsigned int tvlv_len;
ssize_t hdr_len = sizeof(*unicast_tvlv_packet);
- int res;
orig_node = batadv_orig_hash_find(bat_priv, dst);
if (!orig_node)
@@ -633,9 +632,7 @@ void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src,
tvlv_buff += sizeof(*tvlv_hdr);
memcpy(tvlv_buff, tvlv_value, tvlv_value_len);
- res = batadv_send_skb_to_orig(skb, orig_node, NULL);
- if (res == -1)
- kfree_skb(skb);
+ batadv_send_skb_to_orig(skb, orig_node, NULL);
out:
batadv_orig_node_put(orig_node);
}
OpenPOWER on IntegriCloud