Skip to contentSkip to conversation

Bluetooth: Remove unnecessary assignment in SMP

PATCH In review [email protected] 2 participants 2 messages Mar 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Remove unnecessary assignment in SMP

From: Johan Hedberg <[email protected]>

The smp variable in smp_conn_security is not used anywhere before the smp = smp_chan_create() call in the smp_conn_security function so it makes no sense to assign any other value to it before that.

---
 net/bluetooth/smp.c | 2 --
 1 file changed, 2 deletions(-)
net/bluetooth/smp.c +0 -2
index 10a8e622ab2b..2c7370844731 100644
@@ -889,8 +889,6 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
 	if (!conn)
 		return 1;
 
-	smp = conn->smp_chan;
-
 	if (!test_bit(HCI_LE_ENABLED, &hcon->hdev->dev_flags))
 		return 1;
 
Signature · 1 line
1.8.5.3
maintainer
#1 lore raw

Hi Johan,

Quoted 8 lines

The smp variable in smp_conn_security is not used anywhere before the smp = smp_chan_create() call in the smp_conn_security function so it makes no sense to assign any other value to it before that.

---
net/bluetooth/smp.c | 2 --

1 file changed, 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel