aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-03-11 20:47:40 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2015-03-12 03:00:48 -0400
commit983f9814c0199c26a58cbfe98f071e3bfa968839 (patch)
tree6bc7710a6446aca22db45f8ad506bc62eb0d6e2e /net/bluetooth
parent4ba9faf35f6e49964ca6ed88fb0090cc4c727bf3 (diff)
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/bluetooth')
-rw-r--r--net/bluetooth/smp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index c91c19bfc0a8..d6ef7e48c2c3 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)
1743 smp->remote_key_dist &= ~SMP_SC_NO_DIST; 1743 smp->remote_key_dist &= ~SMP_SC_NO_DIST;
1744 /* Wait for Public Key from Initiating Device */ 1744 /* Wait for Public Key from Initiating Device */
1745 return 0; 1745 return 0;
1746 } else {
1747 SMP_ALLOW_CMD(smp, SMP_CMD_PAIRING_CONFIRM);
1748 } 1746 }
1749 1747
1748 SMP_ALLOW_CMD(smp, SMP_CMD_PAIRING_CONFIRM);
1749
1750 /* Request setup of TK */ 1750 /* Request setup of TK */
1751 ret = tk_request(conn, 0, auth, rsp.io_capability, req->io_capability); 1751 ret = tk_request(conn, 0, auth, rsp.io_capability, req->io_capability);
1752 if (ret) 1752 if (ret)
@@ -1926,8 +1926,8 @@ static u8 smp_cmd_pairing_confirm(struct l2cap_conn *conn, struct sk_buff *skb)
1926 1926
1927 if (test_bit(SMP_FLAG_TK_VALID, &smp->flags)) 1927 if (test_bit(SMP_FLAG_TK_VALID, &smp->flags))
1928 return smp_confirm(smp); 1928 return smp_confirm(smp);
1929 else 1929
1930 set_bit(SMP_FLAG_CFM_PENDING, &smp->flags); 1930 set_bit(SMP_FLAG_CFM_PENDING, &smp->flags);
1931 1931
1932 return 0; 1932 return 0;
1933} 1933}