Bluetooth: Fix setting state back to TASK_RUNNING
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 19 Nov 2014 11:16:41 +0000 (13:16 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Nov 2014 15:15:55 +0000 (16:15 +0100)
commit22a3ceabf152c7c88afa9e34ea33fc3fa55e6cf8
treef7098bf77814145b9a9b57a9913c76a91ca4d15e
parenta86c02ea38c53b695209b1181f9e2e18d73eb4e8
Bluetooth: Fix setting state back to TASK_RUNNING

In __hci_cmd_sync_ev() and __hci_req_sync() if the hci_req_run() call
fails and we return from the functions we should ensure that the state
doesn't remain in TASK_INTERRUPTIBLE that we just set it to. This patch
fixes missing calls to set_current_state(TASK_RUNNING) in both places.

Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Tested-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c