From: Iulia Tanasescu Date: Wed, 4 Dec 2024 12:28:48 +0000 (+0200) Subject: Bluetooth: iso: Always release hdev at the end of iso_listen_bis X-Git-Tag: v6.13-rc3~36^2^2~5 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=9c76fff747a73ba01d1d87ed53dd9c00cb40ba05;p=linux-block.git Bluetooth: iso: Always release hdev at the end of iso_listen_bis 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: 02171da6e86a ("Bluetooth: ISO: Add hcon for listening bis sk") Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index a7e0008f0ad8..8575ba749a2c 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -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; }