提交 382b0c39 编写于 作者: A Andre Guedes 提交者: Gustavo Padovan

Bluetooth: Return ENODATA in hci_req_run

In case the HCI request queue is empty, hci_req_run should return
ENODATA instead of EINVAL. This way, hci_req_run returns a more
meaningful error value.
Signed-off-by: NAndre Guedes <andre.guedes@openbossa.org>
Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 bc4445c7
...@@ -2452,7 +2452,7 @@ int hci_req_run(struct hci_request *req, hci_req_complete_t complete) ...@@ -2452,7 +2452,7 @@ int hci_req_run(struct hci_request *req, hci_req_complete_t complete)
/* Do not allow empty requests */ /* Do not allow empty requests */
if (skb_queue_empty(&req->cmd_q)) if (skb_queue_empty(&req->cmd_q))
return -EINVAL; return -ENODATA;
skb = skb_peek_tail(&req->cmd_q); skb = skb_peek_tail(&req->cmd_q);
bt_cb(skb)->req.complete = complete; bt_cb(skb)->req.complete = complete;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册