summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-23 13:27:05 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-23 13:27:05 +0200
commite77b283923d8029a0d10623b7d6359f86fcbb0d7 (patch)
tree105f44f2cf939648b1057eea9f4c5776513b3988
parentb5645b871de0d5af8aec66834bcccd9f06228cc0 (diff)
Require both interrupt and control channels before calling hidp_add_connection
-rw-r--r--input/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/input/device.c b/input/device.c
index 40a98bf6..42c2b2ba 100644
--- a/input/device.c
+++ b/input/device.c
@@ -674,6 +674,9 @@ static int input_device_connected(struct input_device *idev,
dbus_bool_t connected;
int err;
+ if (iconn->intr_io == NULL || iconn->ctrl_io == NULL)
+ return -ENOTCONN;
+
err = hidp_add_connection(idev, iconn);
if (err < 0)
return err;