From 96a4b208757d5bd922571c04f9b2d85bba8ed10f Mon Sep 17 00:00:00 2001 From: Danny Kukawka Date: Tue, 9 Mar 2010 12:20:34 +0100 Subject: event_io(): always use the same exit Changed event_io() to always use the same exit and cleanup. --- hald/linux/addons/addon-input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hald/linux/addons/addon-input.c b/hald/linux/addons/addon-input.c index 0c4cbece..37599ec1 100644 --- a/hald/linux/addons/addon-input.c +++ b/hald/linux/addons/addon-input.c @@ -229,7 +229,7 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) if (input_data->offset + read_bytes < sizeof (struct input_event)) { input_data->offset = input_data->offset + read_bytes; HAL_DEBUG (("incomplete read")); - return TRUE; + goto out; } else { input_data->offset = 0; } @@ -303,7 +303,7 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) /* this is a key repeat and should be ignored for the sleep key */ if (input_data->event.code == KEY_SLEEP && input_data->event.value == 2) { HAL_INFO (("key release event for KEY_SLEEP, ignoring")); - return TRUE; + goto out; } libhal_device_emit_condition (ctx, input_data->udi, @@ -314,6 +314,7 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) } } +out: LIBHAL_FREE_DBUS_ERROR (&error); return TRUE; -- cgit v1.2.3