Since hci_get_route holds the device before returning, the hdev should be released with hci_dev_put at the end of iso_listen_bis even if the function returns with an error. Signed-off-by: Iulia Tanasescu <iulia.tanasescu@xxxxxxx> --- net/bluetooth/iso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index 163b07db575d..b1a211b75625 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -1131,13 +1131,13 @@ static int iso_listen_bis(struct sock *sk) goto unlock; } - hci_dev_put(hdev); - unlock: /* Unlock order should be in reverse from lock order. */ release_sock(sk); hci_dev_unlock(hdev); lock_sock(sk); + + hci_dev_put(hdev); return err; } -- 2.39.2