fpi-device: Simplify logic of fpi_device_task_return_data_free

The clear functions will do NULL checks already, so there's no need to
duplicate such effort
This commit is contained in:
Marco Trevisan (Treviño)
2024-04-17 18:29:52 +02:00
committed by Marco Trevisan
parent b7f3544e98
commit 37ded921fd

View File

@@ -1041,8 +1041,6 @@ fp_device_task_return_in_idle_cb (gpointer user_data)
static void static void
fpi_device_task_return_data_free (FpDeviceTaskReturnData *data) fpi_device_task_return_data_free (FpDeviceTaskReturnData *data)
{
if (data->result)
{ {
switch (data->type) switch (data->type)
{ {
@@ -1065,7 +1063,7 @@ fpi_device_task_return_data_free (FpDeviceTaskReturnData *data)
default: default:
g_assert_not_reached (); g_assert_not_reached ();
} }
}
g_object_unref (data->device); g_object_unref (data->device);
g_free (data); g_free (data);
} }