diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-08-14 14:42:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-14 14:42:54 -0400 |
commit | 1e55217e174f4e6920fd441dcd3aaf8e37645460 (patch) | |
tree | 896dcc55f7f3d54022677747cdcfc26897d33549 /net/bluetooth/smp.c | |
parent | 3bf671af14d591ede9251acb0085e8017f3705e7 (diff) | |
parent | 7dd6753f6d2e7e0ccbf2263cef3a9fff6bc89988 (diff) | |
download | linux-1e55217e174f4e6920fd441dcd3aaf8e37645460.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r-- | net/bluetooth/smp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 16ef0dc85a0a..901a616c8083 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -579,8 +579,11 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb) if (!test_and_set_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->flags)) smp = smp_chan_create(conn); + else + smp = conn->smp_chan; - smp = conn->smp_chan; + if (!smp) + return SMP_UNSPECIFIED; smp->preq[0] = SMP_CMD_PAIRING_REQ; memcpy(&smp->preq[1], req, sizeof(*req)); |