bluetooth: Fix use-before-initiailized var.
authorDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2011 20:03:02 +0000 (13:03 -0700)
committerGustavo F. Padovan <padovan@profusion.mobi>
Fri, 13 May 2011 18:15:23 +0000 (15:15 -0300)
commit77dbc367968f351f377f391d3fff4946828e3734
tree35cff8a505e61210f073677a352dd0cf7a76bfbb
parent55183d06cd1bd939ceccdad628b0aae12c86b803
bluetooth: Fix use-before-initiailized var.

net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’:
net/bluetooth/l2cap_core.c:3612:15: warning: ‘sk’ may be used uninitialized in this function
net/bluetooth/l2cap_core.c:3612:15: note: ‘sk’ was declared here

Actually the problem is in the inline function l2cap_data_channel(), we
branch to the label 'done' which tests 'sk' before we set it to anything.

Initialize it to NULL to fix this.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/bluetooth/l2cap_core.c