projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d4b68b
)
Bluetooth: Report error for HCI reset ioctl when device is down
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 27 Aug 2013 03:57:58 +0000
(20:57 -0700)
committer
Gustavo Padovan
<gustavo.padovan@collabora.co.uk>
Mon, 16 Sep 2013 17:35:55 +0000
(14:35 -0300)
Even if this is legacy API, there is no reason to not report a proper
error when trying to reset a HCI device that is down.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_core.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/hci_core.c
b/net/bluetooth/hci_core.c
index
634deba
..
0976eab
100644
(file)
--- a/
net/bluetooth/hci_core.c
+++ b/
net/bluetooth/hci_core.c
@@
-1344,8
+1344,10
@@
int hci_dev_reset(__u16 dev)
hci_req_lock(hdev);
- if (!test_bit(HCI_UP, &hdev->flags))
+ if (!test_bit(HCI_UP, &hdev->flags)) {
+ ret = -ENETDOWN;
goto done;
+ }
/* Drop queues */
skb_queue_purge(&hdev->rx_q);