libfprint/SOURCES/0054-synaptics-Close-the-us...

31 lines
1.0 KiB
Diff

From e26a788fd6e4c71cfdbd3c62df4a5ebeba81b31b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Thu, 28 Nov 2019 20:35:33 +0100
Subject: [PATCH 054/181] synaptics: Close the usb device if reset failed
If reseting the device failed, we still need to close the usb device before
returning.
---
libfprint/drivers/synaptics/synaptics.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libfprint/drivers/synaptics/synaptics.c b/libfprint/drivers/synaptics/synaptics.c
index 284973c..1524c45 100644
--- a/libfprint/drivers/synaptics/synaptics.c
+++ b/libfprint/drivers/synaptics/synaptics.c
@@ -970,10 +970,7 @@ dev_probe (FpDevice *device)
}
if (!g_usb_device_reset (fpi_device_get_usb_device (device), &error))
- {
- fpi_device_probe_complete (device, NULL, NULL, error);
- return;
- }
+ goto err_close;
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
goto err_close;
--
2.24.1