diff mbox series

Bluetooth: fix error handling path in __add_adv_patterns_monitor()

Message ID 20241022115434.1513930-1-dmantipov@yandex.ru
State New
Headers show
Series Bluetooth: fix error handling path in __add_adv_patterns_monitor() | expand

Commit Message

Dmitry Antipov Oct. 22, 2024, 11:54 a.m. UTC
Add missing call to 'mgmt_pending_remove()' on 'hci_cmd_sync_queue()'
error handling path in '__add_adv_patterns_monitor()'. Compile tested
only.

Fixes: b747a83690c8 ("Bluetooth: hci_sync: Refactor add Adv Monitor")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 net/bluetooth/mgmt.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Fedor Pchelkin March 8, 2025, 2:19 p.m. UTC | #1
Hi Luiz,

On Tue, 22. Oct 14:54, Dmitry Antipov wrote:
> Add missing call to 'mgmt_pending_remove()' on 'hci_cmd_sync_queue()'
> error handling path in '__add_adv_patterns_monitor()'. Compile tested
> only.
> 
> Fixes: b747a83690c8 ("Bluetooth: hci_sync: Refactor add Adv Monitor")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---

Would you consider the patch, please?

It looks reasonable and is still applicable to the mainline AFAICS.

Thanks!

>  net/bluetooth/mgmt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index a429661b676a..92c9808e419b 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -5301,6 +5301,7 @@ static int __add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev,
>  		else
>  			status = MGMT_STATUS_FAILED;
>  
> +		mgmt_pending_remove(cmd);
>  		goto unlock;
>  	}
>  
> -- 
> 2.47.0
diff mbox series

Patch

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index a429661b676a..92c9808e419b 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5301,6 +5301,7 @@  static int __add_adv_patterns_monitor(struct sock *sk, struct hci_dev *hdev,
 		else
 			status = MGMT_STATUS_FAILED;
 
+		mgmt_pending_remove(cmd);
 		goto unlock;
 	}