aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-05-16 15:25:39 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-05-16 15:25:39 -0700
commitd16c663f55f9e53609a7e9294c70cee2b42c8beb (patch)
treeef61728c76a3e0da31960df25b0f1b8f9972e97a /tools
parenta09e97ef081483ef98c6ebb0abe8a5cca7c3f314 (diff)
downloadbluez-d16c663f55f9e53609a7e9294c70cee2b42c8beb.tar.gz
Fix uninitialized fallout from Mario's patches
Diffstat (limited to 'tools')
-rw-r--r--tools/hid2hci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/hid2hci.c b/tools/hid2hci.c
index 59bd984e..d5c8d32d 100644
--- a/tools/hid2hci.c
+++ b/tools/hid2hci.c
@@ -210,7 +210,7 @@ static int switch_dell(struct device_info *devinfo)
char report[] = { 0x7f, 0x00, 0x00, 0x00 };
struct usb_dev_handle *handle;
- int err;
+ int err = -EINVAL;
switch(devinfo->mode) {
case HCI:
@@ -222,6 +222,7 @@ static int switch_dell(struct device_info *devinfo)
}
handle = usb_open(devinfo->dev);
+
if (handle && usb_claim_interface(handle,0) == 0)
err = usb_control_msg(handle,
USB_ENDPOINT_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,