Bluetooth: Remove redundant check for req.cmd_q
Subsystems (2)
PATCH 1/1 Bluetooth: Remove redundant check for req.cmd_q
From: Johan Hedberg <[email protected]>
The hci_req_run() function already checks for empty cmd_q and bails out if necessary. Also, req.cmd_q should really be treated as private data of the request and not accessed directly.
Signed-off-by Johan Hedberg <[email protected]>
--- net/bluetooth/hci_request.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/hci_request.c +1 -2
@@ -1187,8 +1187,7 @@ static void adv_timeout_expire(struct work_struct *work)if (list_empty (&hdev->adv_instances))__hci_req_disable_advertising (&req); -if (!skb_queue_empty (&req.cmd_q)) -hci_req_run (&req,NULL ); +hci_req_run (&req,NULL ); unlock:hci_dev_unlock (hdev);
Signature · 1 line
2.5.0
Marcel Holtmann
maintainerHi Johan,
Quoted 8 lines
The
hci_req_run()function already checks for emptycmd_qand bails out if necessary. Also, req.cmd_q should really be treated as private data of the request and not accessed directly.Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/hci_request.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel