diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 248632cec11df99048dfb11f66fa6bdda8de7f40..b64cfa213bd680387634b49ebcb9ce00a42d07a0 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -1365,6 +1365,9 @@ static bool hci_resolve_next_name(struct hci_dev *hdev) return false; e = hci_inquiry_cache_lookup_resolve(hdev, BDADDR_ANY, NAME_NEEDED); + if (!e) + return false; + if (hci_resolve_name(hdev, e) == 0) { e->name_state = NAME_PENDING; return true;