From: Johan Hedberg Date: Thu, 7 Aug 2014 07:03:31 +0000 (+0300) Subject: Bluetooth: Remove redundant check for remote_key_dist X-Git-Tag: v4.14-rc1~6661^2~133^2~84^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fcb93475697911eb239f68241903eb5540803ac;p=platform%2Fkernel%2Flinux-rpi.git Bluetooth: Remove redundant check for remote_key_dist 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index fd32943..40db728 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -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;