diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index c736186aba26..2cd92c97ae02 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -441,8 +441,10 @@ static void __sco_sock_close(struct sock *sk) sk->sk_state = BT_DISCONN; sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT); sco_conn_lock(sco_pi(sk)->conn); - hci_conn_drop(sco_pi(sk)->conn->hcon); - sco_pi(sk)->conn->hcon = NULL; + if (sco_pi(sk)->conn->hcon) { + hci_conn_drop(sco_pi(sk)->conn->hcon); + sco_pi(sk)->conn->hcon = NULL; + } sco_conn_unlock(sco_pi(sk)->conn); } else sco_chan_del(sk, ECONNRESET);