summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--input/device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/input/device.c b/input/device.c
index 8488b406..8f255fd7 100644
--- a/input/device.c
+++ b/input/device.c
@@ -612,8 +612,10 @@ static gboolean interrupt_connect_cb(GIOChannel *chan, GIOCondition cond,
}
if (idev->hidp.subclass & 0x40) {
- err = encrypt_link(&idev->src, &idev->dst);
- if (err < 0) {
+ int ret;
+ ret = encrypt_link(&idev->src, &idev->dst);
+ if (ret < 0) {
+ err = -ret;
close(ctl);
goto failed;
}