From b16245ad588bf7467a3580726184f48af328414d Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 25 Nov 2019 18:34:55 +0100 Subject: [PATCH] elan: Fix switch in change_state The switch in change_state had a useless break and a useless if clause. Remove both. --- libfprint/drivers/elan.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libfprint/drivers/elan.c b/libfprint/drivers/elan.c index 6e9107e..961366e 100644 --- a/libfprint/drivers/elan.c +++ b/libfprint/drivers/elan.c @@ -975,8 +975,6 @@ elan_change_state (FpImageDevice *idev) switch (next_state) { - break; - case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_ON: /* activation completed or another enroll stage started */ elan_calibrate (dev); @@ -988,9 +986,8 @@ elan_change_state (FpImageDevice *idev) case FP_IMAGE_DEVICE_STATE_INACTIVE: case FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF: - if (self->dev_state != FP_IMAGE_DEVICE_STATE_INACTIVE || - self->dev_state != FP_IMAGE_DEVICE_STATE_AWAIT_FINGER_OFF) - elan_stop_capture (dev); + elan_stop_capture (dev); + break; } }