When hci_conn_params_clear is called, it is always followed by a
call to hci_pend_le_conns_clear. So instead of making this explicit
just make sure it is always called. This makes this function similar
on how hci_conn_params_add and hci_conn_params_del work.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
        } else if (memcmp(buf, "clr", 3) == 0) {
                hci_dev_lock(hdev);
                hci_conn_params_clear(hdev);
-               hci_pend_le_conns_clear(hdev);
                hci_update_background_scan(hdev);
                hci_dev_unlock(hdev);
        } else {
                kfree(params);
        }
 
+       hci_pend_le_conns_clear(hdev);
+
        BT_DBG("All LE connection parameters were removed");
 }
 
        hci_remote_oob_data_clear(hdev);
        hci_white_list_clear(hdev);
        hci_conn_params_clear(hdev);
-       hci_pend_le_conns_clear(hdev);
        hci_dev_unlock(hdev);
 
        hci_dev_put(hdev);