diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-03-12 00:47:40 (GMT) |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-03-12 07:00:48 (GMT) |
commit | 983f9814c0199c26a58cbfe98f071e3bfa968839 (patch) | |
tree | 6bc7710a6446aca22db45f8ad506bc62eb0d6e2e /net | |
parent | 4ba9faf35f6e49964ca6ed88fb0090cc4c727bf3 (diff) | |
download | linux-983f9814c0199c26a58cbfe98f071e3bfa968839.tar.xz |
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: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/smp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index c91c19b..d6ef7e4 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -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,8 +1926,8 @@ 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); + + set_bit(SMP_FLAG_CFM_PENDING, &smp->flags); return 0; } |