Bluetooth: Remove redundant check for remote_key_dist
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 7 Aug 2014 07:03:31 +0000 (10:03 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 14 Aug 2014 06:49:10 +0000 (08:49 +0200)
In the smp_cmd_sign_info() function the SMP_DIST_SIGN bit is explicitly
cleared early on in the function. This means that there's no need to
check for it again before calling smp_distribute_keys().

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c

index fd32943..40db728 100644 (file)
@@ -1168,8 +1168,7 @@ static int smp_cmd_sign_info(struct l2cap_conn *conn, struct sk_buff *skb)
                memcpy(csrk->val, rp->csrk, sizeof(csrk->val));
        }
        smp->csrk = csrk;
-       if (!(smp->remote_key_dist & SMP_DIST_SIGN))
-               smp_distribute_keys(conn);
+       smp_distribute_keys(conn);
        hci_dev_unlock(hdev);
 
        return 0;