diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index d8fc47adcbe74a5156c4c16bd0c151e2904b2a4d..1874d50e96aa25d84a0a197f11c6a79852884214 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -5332,7 +5332,7 @@ static void mgmt_add_adv_patterns_monitor_complete(struct hci_dev *hdev, * hci_adv_monitors_clear is about to be called which will take care of * freeing the adv_monitor instances. */ - if (status == -ECANCELED && !mgmt_pending_valid(hdev, cmd)) + if (status == -ECANCELED || !mgmt_pending_valid(hdev, cmd)) return; monitor = cmd->user_data;