diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 9669d4ab58f..8cec7416ca6 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -397,8 +397,10 @@ static void __sco_sock_close(struct sock *sk) if (sco_pi(sk)->conn) { sk->sk_state = BT_DISCONN; sco_sock_set_timer(sk, SCO_DISCONN_TIMEOUT); - hci_conn_put(sco_pi(sk)->conn->hcon); - sco_pi(sk)->conn->hcon = NULL; + if (sco_pi(sk)->conn->hcon != NULL) { + hci_conn_put(sco_pi(sk)->conn->hcon); + sco_pi(sk)->conn->hcon = NULL; + } } else sco_chan_del(sk, ECONNRESET); break;