diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-15 07:07:59 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-15 08:01:19 +0200 |
commit | 3a19b6feb26295fe03c9242a72084d2f32dcaac4 (patch) | |
tree | 068d4e7def538e70267e156029de065f5180b103 /net/bluetooth | |
parent | Bluetooth: btmrvl: avoid sending data to firmware after hs_activated (diff) | |
download | linux-3a19b6feb26295fe03c9242a72084d2f32dcaac4.tar.xz linux-3a19b6feb26295fe03c9242a72084d2f32dcaac4.zip |
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: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_event.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 8980bd24b8c0..bf2926b2e4a9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -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) |