diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-09-25 06:26:05 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-09-25 13:30:10 -0400 |
commit | 970871bc9cb2f5f783cb7cca31ff223c44662327 (patch) | |
tree | 7b4cb482b6441f43b17388b359232f36d0b47dc6 /net/bluetooth/l2cap_sock.c | |
parent | 0fba96f97bba73469dd952319fddc4a3cc99dd97 (diff) |
Bluetooth: Clean up socket locking in l2cap_sock_recvmsg
This patch cleans up the locking login in l2cap_sock_recvmsg by pairing
up each lock_sock call with a release_sock call. The function already
has a "done" label that handles releasing the socket and returning from
the function so the fix is rather simple.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index ad95b426b09c..c85537ca1a23 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -805,8 +805,8 @@ static int l2cap_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
805 | pi->chan->state = BT_CONFIG; | 805 | pi->chan->state = BT_CONFIG; |
806 | 806 | ||
807 | __l2cap_connect_rsp_defer(pi->chan); | 807 | __l2cap_connect_rsp_defer(pi->chan); |
808 | release_sock(sk); | 808 | err = 0; |
809 | return 0; | 809 | goto done; |
810 | } | 810 | } |
811 | 811 | ||
812 | release_sock(sk); | 812 | release_sock(sk); |