diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-06-19 22:00:11 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-19 22:00:11 +0200 |
commit | 69d4cfef8befc6ed89e5e3280f3170eb3153d57a (patch) | |
tree | 63420f8bdf0b26931f7a773bde10ae0ecb3fa3a7 /net/bluetooth/mgmt.c | |
parent | mwifiex: fix wrong return values in add_virtual_intf() error cases (diff) | |
parent | Bluetooth: btmrvl: Do not send vendor events to bluetooth stack (diff) | |
download | linux-69d4cfef8befc6ed89e5e3280f3170eb3153d57a.tar.xz linux-69d4cfef8befc6ed89e5e3280f3170eb3153d57a.zip |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 991d5b667674..3e5e3362ea00 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1598,7 +1598,7 @@ static int disconnect(struct sock *sk, struct hci_dev *hdev, void *data, else conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); - if (!conn) { + if (!conn || conn->state == BT_OPEN || conn->state == BT_CLOSED) { err = cmd_status(sk, hdev->id, MGMT_OP_DISCONNECT, MGMT_STATUS_NOT_CONNECTED); goto failed; |