aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-01-30 22:39:59 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2014-02-13 02:51:40 -0500
commita513e260ce25eaa5e8c6b834a70085be1d6f40c0 (patch)
treebbcc370c7aa8e9ba8826eb87575e39919178a8a5 /net/bluetooth/hci_core.c
parent21b93b75ad1090dd9aed69b56292648bac6666a9 (diff)
Bluetooth: Remove unnecessary LTK type check from hci_add_ltk
All callers of hci_add_ltk pass a valid value to it. There are no places where e.g. user space, the controller or the remote peer would be able to cause invalid values to be passed. Therefore, just remove the potentially confusing check from the beginning of the function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 754a59079de9..180473d965f6 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2692,9 +2692,6 @@ int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
2692{ 2692{
2693 struct smp_ltk *key, *old_key; 2693 struct smp_ltk *key, *old_key;
2694 2694
2695 if (!(type & HCI_SMP_STK) && !(type & HCI_SMP_LTK))
2696 return 0;
2697
2698 old_key = hci_find_ltk_by_addr(hdev, bdaddr, addr_type); 2695 old_key = hci_find_ltk_by_addr(hdev, bdaddr, addr_type);
2699 if (old_key) 2696 if (old_key)
2700 key = old_key; 2697 key = old_key;