]> git.baikalelectronics.ru Git - kernel.git/commit
bluetooth: Fix use-before-initiailized var.
authorDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2011 20:03:02 +0000 (13:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2011 20:03:02 +0000 (13:03 -0700)
commita06d226a92a9331d91091f867765f53c923ba7e9
tree280e72e3d33b90e302485875b82b520e13c89513
parent1b2abd38ee6ba870e7cf3ea2c9632a39eed803c3
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