Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0db4c184 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

btm_io_capabilities_rsp: remove unnecesary null check

To reach this function, device must be bonded or bonding, so it will
have a security record. It's used without null check earlier and later
in this function.

Bug: 333634398
Bug: 377513028
Test: mma -j32;
Flag: com.android.bluetooth.flags.key_missing_classic_device
Change-Id: I05e3da3cda796924eabb0384a40e1ec798584088
parent b10307e7
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -2632,11 +2632,8 @@ void btm_io_capabilities_rsp(const tBTM_SP_IO_RSP evt_data) {
      com::android::bluetooth::flags::key_missing_classic_device()) {
    log::warn("Incoming bond request, but {} is already bonded (notifying user)", evt_data.bd_addr);
    bta_dm_remote_key_missing(evt_data.bd_addr);

    if (p_dev_rec != NULL) {
    btm_sec_disconnect(p_dev_rec->hci_handle, HCI_ERR_AUTH_FAILURE,
                       "btm_io_capabilities_rsp for bonded device");
    }
    return;
  }