From 550a8ca765a154ca38dcd888b4f12a173e761bdc Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 27 Nov 2015 11:11:52 +0200 Subject: [PATCH] Bluetooth: Remove redundant check for req.cmd_q 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 Signed-off-by: Marcel Holtmann --- net/bluetooth/hci_request.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index edf2199de4ff..f1529d7740f6 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -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); -- 2.20.1