Bluetooth: Fix handling of getsockname() for HCI sockets
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 26 Aug 2013 07:20:37 +0000 (00:20 -0700)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 16 Sep 2013 17:35:54 +0000 (14:35 -0300)
commit9d4b68b23947e7bdf3f2707e76bd61572c523f6c
tree5a41ecc403ea5f0c02a0dad77c94d3b3a2db4997
parent06f43cbc4d61922d5a14c28909f02ae9c7fc5283
Bluetooth: Fix handling of getsockname() for HCI sockets

The hci_dev check is not protected and so move it into the socket lock. In
addition return the HCI channel identifier instead of always 0 channel.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_sock.c