aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-11-05 02:31:39 -0500
committerMarcel Holtmann <marcel@holtmann.org>2015-11-19 11:50:27 -0500
commit5fcc86bd2695d4ccad2d87cb424f4c01a4e544f3 (patch)
tree379b31ff93597c5fcd587770e198271e50f6436a /include
parent618e8bc228cda7b8c517caac40a45ee909b8672d (diff)
Bluetooth: Remove redundant setting to zero of bt_cb
The socket allocation functions will always memset skb->cb to zero so there's no need to make other initializations needing the same thing. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/bluetooth.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 663e0ef1eaa0..a85e6d3d75ef 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -325,10 +325,8 @@ static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
325 struct sk_buff *skb; 325 struct sk_buff *skb;
326 326
327 skb = alloc_skb(len + BT_SKB_RESERVE, how); 327 skb = alloc_skb(len + BT_SKB_RESERVE, how);
328 if (skb) { 328 if (skb)
329 skb_reserve(skb, BT_SKB_RESERVE); 329 skb_reserve(skb, BT_SKB_RESERVE);
330 bt_cb(skb)->incoming = 0;
331 }
332 return skb; 330 return skb;
333} 331}
334 332
@@ -338,10 +336,8 @@ static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
338 struct sk_buff *skb; 336 struct sk_buff *skb;
339 337
340 skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err); 338 skb = sock_alloc_send_skb(sk, len + BT_SKB_RESERVE, nb, err);
341 if (skb) { 339 if (skb)
342 skb_reserve(skb, BT_SKB_RESERVE); 340 skb_reserve(skb, BT_SKB_RESERVE);
343 bt_cb(skb)->incoming = 0;
344 }
345 341
346 if (!skb && *err) 342 if (!skb && *err)
347 return NULL; 343 return NULL;