From e77b283923d8029a0d10623b7d6359f86fcbb0d7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 23 Feb 2009 13:27:05 +0200 Subject: Require both interrupt and control channels before calling hidp_add_connection --- input/device.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'input') 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; -- cgit