Hi Ram, On Wed, Jul 18, 2012, Malovany, Ram wrote: > > > e = hci_inquiry_cache_lookup_resolve(hdev, BDADDR_ANY, NAME_NEEDED); > > > - if (hci_resolve_name(hdev, e) == 0) { > > > + if (e && hci_resolve_name(hdev, e) == 0) { > > > e->name_state = NAME_PENDING; > > > return true; > > > } > > > > This missing NULL check is the first fix. You might actually consider > > doing: > > > > if (!e) > > return false; > > > > I didn't want to change the coding in this specific file , as you can > see in the function: > > hci_inquiry_complete_evt() , calling it the same way. > But I can changed them both if needed. Do you want me to ? The code in hci_inquiry_complete_evt() is a bit different though. There you have something else instead of a simple return statement if e is NULL (set the discovery state and unlock hdev) so changing that part wouldn't really simplify the code much. In your case the code does however get a bit simpler since all you need to do is return false. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html