diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/smp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 9752879fdd3a..3a7b0773536b 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -2700,7 +2700,13 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb) | |||
2700 | * key was set/generated. | 2700 | * key was set/generated. |
2701 | */ | 2701 | */ |
2702 | if (test_bit(SMP_FLAG_LOCAL_OOB, &smp->flags)) { | 2702 | if (test_bit(SMP_FLAG_LOCAL_OOB, &smp->flags)) { |
2703 | struct smp_dev *smp_dev = chan->data; | 2703 | struct l2cap_chan *hchan = hdev->smp_data; |
2704 | struct smp_dev *smp_dev; | ||
2705 | |||
2706 | if (!hchan || !hchan->data) | ||
2707 | return SMP_UNSPECIFIED; | ||
2708 | |||
2709 | smp_dev = hchan->data; | ||
2704 | 2710 | ||
2705 | tfm_ecdh = smp_dev->tfm_ecdh; | 2711 | tfm_ecdh = smp_dev->tfm_ecdh; |
2706 | } else { | 2712 | } else { |