提交 3a19b6fe 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Remove unnecessary params variable from process_adv_report()

The params variable was just used for storing the return value from the
hci_pend_le_action_lookup() function and then checking whether it's NULL
or not. We can simplify the code by checking the return value directly.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 5bf8a748
......@@ -4314,14 +4314,11 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr,
* device found events.
*/
if (hdev->le_scan_type == LE_SCAN_PASSIVE) {
struct hci_conn_params *param;
if (type == LE_ADV_DIRECT_IND)
return;
param = hci_pend_le_action_lookup(&hdev->pend_le_reports,
bdaddr, bdaddr_type);
if (!param)
if (!hci_pend_le_action_lookup(&hdev->pend_le_reports,
bdaddr, bdaddr_type))
return;
if (type == LE_ADV_NONCONN_IND || type == LE_ADV_SCAN_IND)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册