From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> --- android/hog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/hog.c b/android/hog.c index 1069cca..2cce4e9 100644 --- a/android/hog.c +++ b/android/hog.c @@ -1007,7 +1007,10 @@ void bt_hog_detach(struct bt_hog *hog) for (l = hog->reports; l; l = l->next) { struct report *r = l->data; - g_attrib_unregister(hog->attrib, r->notifyid); + if (r->notifyid > 0) { + g_attrib_unregister(hog->attrib, r->notifyid); + r->notifyid = 0; + } } if (hog->scpp) -- 1.9.3 -- 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