summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-19 15:07:03 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-19 15:07:03 +0000
commita798bf638f53dacb92d23265a0d228886e8bd5f0 (patch)
tree257395b12a5a6029168af66ab6ccfca722a64bec
parentf2c6a6f2debcccfb51d239834c3cf91a2c3a6c40 (diff)
input: handling encrypt_link function return value properly
-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;
}