The SMP code contains two else branches that are not needed since the
successful test will actually leave the function.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
smp->remote_key_dist &= ~SMP_SC_NO_DIST;
/* Wait for Public Key from Initiating Device */
return 0;
smp->remote_key_dist &= ~SMP_SC_NO_DIST;
/* Wait for Public Key from Initiating Device */
return 0;
- } else {
- SMP_ALLOW_CMD(smp, SMP_CMD_PAIRING_CONFIRM);
+ SMP_ALLOW_CMD(smp, SMP_CMD_PAIRING_CONFIRM);
+
/* Request setup of TK */
ret = tk_request(conn, 0, auth, rsp.io_capability, req->io_capability);
if (ret)
/* Request setup of TK */
ret = tk_request(conn, 0, auth, rsp.io_capability, req->io_capability);
if (ret)
if (test_bit(SMP_FLAG_TK_VALID, &smp->flags))
return smp_confirm(smp);
if (test_bit(SMP_FLAG_TK_VALID, &smp->flags))
return smp_confirm(smp);
- else
- set_bit(SMP_FLAG_CFM_PENDING, &smp->flags);
+
+ set_bit(SMP_FLAG_CFM_PENDING, &smp->flags);