From a798bf638f53dacb92d23265a0d228886e8bd5f0 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Mon, 19 Mar 2007 15:07:03 +0000 Subject: input: handling encrypt_link function return value properly --- input/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'input/device.c') 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; } -- cgit