aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-15 01:07:59 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-15 02:01:19 -0400
commit3a19b6feb26295fe03c9242a72084d2f32dcaac4 (patch)
tree068d4e7def538e70267e156029de065f5180b103 /net
parent5bf8a7481d21a669dd9dd874c00f7815a878111a (diff)
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')
-rw-r--r--net/bluetooth/hci_event.c7
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,
4314 * device found events. 4314 * device found events.
4315 */ 4315 */
4316 if (hdev->le_scan_type == LE_SCAN_PASSIVE) { 4316 if (hdev->le_scan_type == LE_SCAN_PASSIVE) {
4317 struct hci_conn_params *param;
4318
4319 if (type == LE_ADV_DIRECT_IND) 4317 if (type == LE_ADV_DIRECT_IND)
4320 return; 4318 return;
4321 4319
4322 param = hci_pend_le_action_lookup(&hdev->pend_le_reports, 4320 if (!hci_pend_le_action_lookup(&hdev->pend_le_reports,
4323 bdaddr, bdaddr_type); 4321 bdaddr, bdaddr_type))
4324 if (!param)
4325 return; 4322 return;
4326 4323
4327 if (type == LE_ADV_NONCONN_IND || type == LE_ADV_SCAN_IND) 4324 if (type == LE_ADV_NONCONN_IND || type == LE_ADV_SCAN_IND)