From 4b2b431700788f9d9bf8106ca9fa85e52eca9c4b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 23 Oct 2014 15:49:06 -0700 Subject: [PATCH] config: Combine two exit paths --- src/backends/meta-monitor-config.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backends/meta-monitor-config.c b/src/backends/meta-monitor-config.c index ac83cd9e5..a421761f2 100644 --- a/src/backends/meta-monitor-config.c +++ b/src/backends/meta-monitor-config.c @@ -863,16 +863,13 @@ apply_configuration (MetaMonitorConfig *self, MetaMonitorManager *manager) { GPtrArray *crtcs, *outputs; + gboolean ret = FALSE; crtcs = g_ptr_array_new_full (config->n_outputs, (GDestroyNotify)meta_crtc_info_free); outputs = g_ptr_array_new_full (config->n_outputs, (GDestroyNotify)meta_output_info_free); if (!meta_monitor_config_assign_crtcs (config, manager, crtcs, outputs)) - { - g_ptr_array_unref (crtcs); - g_ptr_array_unref (outputs); - return FALSE; - } + goto out; meta_monitor_manager_apply_configuration (manager, (MetaCRTCInfo**)crtcs->pdata, crtcs->len, @@ -884,9 +881,12 @@ apply_configuration (MetaMonitorConfig *self, * inside turn_off_laptop_display / apply_configuration_with_lid */ self->current_is_for_laptop_lid = FALSE; + ret = TRUE; + + out: g_ptr_array_unref (crtcs); g_ptr_array_unref (outputs); - return TRUE; + return ret; } static gboolean