linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Remove unneeded zero initialization
@ 2012-03-28 11:56 Andrei Emeltchenko
  2012-03-28 12:46 ` Marcel Holtmann
  2012-03-28 13:06 ` Andrei Emeltchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Andrei Emeltchenko @ 2012-03-28 11:56 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Remove zero initialization since channel is allocated with kzalloc
in l2cap_chan_create.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 net/bluetooth/l2cap_sock.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 53e563f..4e73b41 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -999,7 +999,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
 		}
 
 		chan->imtu = L2CAP_DEFAULT_MTU;
-		chan->omtu = 0;
+
 		if (!disable_ertm && sk->sk_type == SOCK_STREAM) {
 			chan->mode = L2CAP_MODE_ERTM;
 			set_bit(CONF_STATE2_DEVICE, &chan->conf_state);
@@ -1011,7 +1011,6 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
 		chan->tx_win = L2CAP_DEFAULT_TX_WINDOW;
 		chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
 		chan->sec_level = BT_SECURITY_LOW;
-		chan->flags = 0;
 		set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
 	}
 
-- 
1.7.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-28 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-28 11:56 [PATCH] Bluetooth: Remove unneeded zero initialization Andrei Emeltchenko
2012-03-28 12:46 ` Marcel Holtmann
2012-03-28 13:06 ` Andrei Emeltchenko
2012-03-28 14:05   ` Marcel Holtmann
2012-03-28 14:33   ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).