From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> --- net/bluetooth/hci_conn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index fe64621..eed9c8e 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -439,8 +439,10 @@ int hci_conn_del(struct hci_conn *conn) hci_chan_list_flush(conn); - if (conn->amp_mgr) - amp_mgr_put(conn->amp_mgr); + if (conn->amp_mgr) { + if (amp_mgr_put(conn->amp_mgr)) + conn->amp_mgr = NULL; + } hci_conn_hash_del(hdev, conn); if (hdev->notify) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html