fwupd/0001-unifying-Release-device-in-error-path.patch
Bastien Nocera 525affae4d + fwupd-0.8.1-2
Release claimed devices on error, fixes unusable input devices
2017-03-23 12:32:27 +01:00

34 lines
1.1 KiB
Diff

From 5b6f6d209e0b23e12ab67f4908ab2cbf5b9e4982 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 23 Mar 2017 12:20:02 +0100
Subject: [PATCH] unifying: Release device in error path
When starting up fwupd, and the unifying receiver doesn't reply as
we expect, fwupd keeps the device claimed, making it unavailable for use
as an input device.
https://github.com/hughsie/fwupd/issues/101
---
plugins/unifying/fu-plugin-unifying.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/unifying/fu-plugin-unifying.c b/plugins/unifying/fu-plugin-unifying.c
index 8fdf7db..d33a8b3 100644
--- a/plugins/unifying/fu-plugin-unifying.c
+++ b/plugins/unifying/fu-plugin-unifying.c
@@ -61,8 +61,10 @@ fu_plugin_unifying_device_added (FuPlugin *plugin,
fu_device_set_id (FU_DEVICE (dev), platform_id);
/* open the device */
- if (!fu_device_unifying_open (dev, error))
+ if (!fu_device_unifying_open (dev, error)) {
+ fu_device_unifying_close (dev, NULL);
return FALSE;
+ }
/* close the device */
if (!fu_device_unifying_close (dev, error))
--
2.12.0