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

Commit 983f9814 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg
Browse files

Bluetooth: Remove two else branches that are not needed



The SMP code contains two else branches that are not needed since the
successful test will actually leave the function.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 4ba9faf3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1743,10 +1743,10 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
		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)
@@ -1926,7 +1926,7 @@ static u8 smp_cmd_pairing_confirm(struct l2cap_conn *conn, struct sk_buff *skb)

	if (test_bit(SMP_FLAG_TK_VALID, &smp->flags))
		return smp_confirm(smp);
	else

	set_bit(SMP_FLAG_CFM_PENDING, &smp->flags);

	return 0;