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

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