From: Johan Hedberg Date: Fri, 27 Nov 2015 09:11:52 +0000 (+0200) Subject: Bluetooth: Remove redundant check for req.cmd_q X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=550a8ca765a154ca38dcd888b4f12a173e761bdc;p=linux-beck.git 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 --- 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);