Skip to content

Commit

Permalink
Bluetooth: iso: Always release hdev at the end of iso_listen_bis
Browse files Browse the repository at this point in the history
[ Upstream commit 9c76fff ]

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.

Fixes: 02171da ("Bluetooth: ISO: Add hcon for listening bis sk")
Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
iulia-tanasescu authored and gregkh committed Dec 19, 2024
1 parent f9ecc90 commit 4ca50db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/bluetooth/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,10 +1158,9 @@ static int iso_listen_bis(struct sock *sk)
goto unlock;
}

hci_dev_put(hdev);

unlock:
hci_dev_unlock(hdev);
hci_dev_put(hdev);
return err;
}

Expand Down

0 comments on commit 4ca50db

Please sign in to comment.