diff --git a/tools/ratbag-command.c b/tools/ratbag-command.c index 2312595d..75165563 100644 --- a/tools/ratbag-command.c +++ b/tools/ratbag-command.c @@ -945,7 +945,6 @@ ratbag_cmd_profile_active_set(const struct ratbag_cmd *cmd, struct ratbag_profile *profile = NULL, *active_profile = NULL; int num_profiles, index; int rc = 1; - int i; if (argc != 1) { usage(); @@ -982,20 +981,6 @@ ratbag_cmd_profile_active_set(const struct ratbag_cmd *cmd, goto out; } - for (i = 0; i < num_profiles; i++) { - active_profile = ratbag_device_get_profile_by_index(device, i); - if (ratbag_profile_is_active(active_profile)) - break; - ratbag_profile_unref(active_profile); - active_profile = NULL; - } - - if (!active_profile) { - error("Failed to retrieve the profile '%d' \n", - index); - goto out; - } - rc = ratbag_profile_set_active(profile); if (!rc) { printf("Switched '%s' to profile '%d'\n",