Diff between 8ff63e27074622730b6c97c4c73d6c13b7fcf3c5 and 1ea2ce1c0ab8504c5977c2f009c84c6eb931d9f0

Changed Files

File Additions Deletions Status
profiles/gatt/manager.c +7 -2 modified

Full Patch

diff --git a/profiles/gatt/manager.c b/profiles/gatt/manager.c
index a1fa756..0702d26 100644
--- a/profiles/gatt/manager.c
+++ b/profiles/gatt/manager.c
@@ -30,6 +30,7 @@
 #include "gattrib.h"
 #include "gatt.h"
 #include "gas.h"
+#include "log.h"
 #include "manager.h"
 
 static gint primary_uuid_cmp(gconstpointer a, gconstpointer b)
@@ -55,8 +56,12 @@ static int gatt_driver_probe(struct btd_device *device, GSList *uuids)
 	if (l)
 		gatt = l->data;
 
-	return gas_register(device, gap ? &gap->range : NULL,
-				gatt ? &gatt->range : NULL);
+	if (gap == NULL || gatt == NULL) {
+		error("GAP and GATT are mandatory");
+		return -EINVAL;
+	}
+
+	return gas_register(device, &gap->range, &gatt->range);
 }
 
 static void gatt_driver_remove(struct btd_device *device)