Diff between e8ce0504e90f4954ec56ecbbbde25554bfe90bd4 and 6b5b3e34434d6ed8f938d40137e5e39b0edb3198

Changed Files

File Additions Deletions Status
profiles/cyclingspeed/cyclingspeed.c +16 -8 modified

Full Patch

diff --git a/profiles/cyclingspeed/cyclingspeed.c b/profiles/cyclingspeed/cyclingspeed.c
index 3fcf492..941b593 100644
--- a/profiles/cyclingspeed/cyclingspeed.c
+++ b/profiles/cyclingspeed/cyclingspeed.c
@@ -1022,29 +1022,37 @@ static void property_set_location(const GDBusPropertyTable *property,
 	uint8_t att_val[2];
 	struct controlpoint_req *req;
 
-	if (csc->pending_req != NULL)
-		return g_dbus_pending_property_error(id,
+	if (csc->pending_req != NULL) {
+		g_dbus_pending_property_error(id,
 					ERROR_INTERFACE ".InProgress",
 					"Operation already in progress");
+		return;
+	}
 
-	if (!(csc->feature & MULTI_SENSOR_LOC_SUPPORT))
-		return g_dbus_pending_property_error(id,
+	if (!(csc->feature & MULTI_SENSOR_LOC_SUPPORT)) {
+		g_dbus_pending_property_error(id,
 					ERROR_INTERFACE ".NotSupported",
 					"Feature is not supported");
+		return;
+	}
 
-	if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING)
-		return g_dbus_pending_property_error(id,
+	if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING) {
+		g_dbus_pending_property_error(id,
 					ERROR_INTERFACE ".InvalidArguments",
 					"Invalid arguments in method call");
+		return;
+	}
 
 	dbus_message_iter_get_basic(iter, &loc);
 
 	loc_val = str2location(loc);
 
-	if (loc_val < 0)
-		return g_dbus_pending_property_error(id,
+	if (loc_val < 0) {
+		g_dbus_pending_property_error(id,
 					ERROR_INTERFACE ".InvalidArguments",
 					"Invalid arguments in method call");
+		return;
+	}
 
 	req = g_new(struct controlpoint_req, 1);
 	req->csc = csc;