mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-09-09 04:40:06 +00:00
elanmoc: Do not pass NULL error to SSM mark failed
The error has been already checked and it's null here, so we need to return a new error
This commit is contained in:
committed by
Marco Trevisan
parent
2dee163512
commit
2a4e68d64a
@@ -390,11 +390,20 @@ elanmoc_enroll_cb (FpiDeviceElanmoc *self,
|
||||
}
|
||||
|
||||
if (self->num_frames == self->max_moc_enroll_time && buffer_in[1] == ELAN_MSG_OK)
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
{
|
||||
fpi_ssm_next_state (self->task_ssm);
|
||||
}
|
||||
else if (self->num_frames < self->max_moc_enroll_time)
|
||||
fpi_ssm_jump_to_state (self->task_ssm, MOC_ENROLL_WAIT_FINGER);
|
||||
{
|
||||
fpi_ssm_jump_to_state (self->task_ssm, MOC_ENROLL_WAIT_FINGER);
|
||||
}
|
||||
else
|
||||
fpi_ssm_mark_failed (self->task_ssm, error);
|
||||
{
|
||||
fpi_ssm_mark_failed (self->task_ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Enrollment failed (status 0x%02x)",
|
||||
buffer_in[1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user