/* get the number of ports of the hub */
if (DeviceIoControl(hub_device, IOCTL_USB_GET_NODE_INFORMATION,
&hub_info, size, &hub_info, size, &size, NULL))
- /* enumarate the ports of the hub */
+ /* enumerate the ports of the hub */
enumerate_hub_ports(port, hub_device,
hub_info.u.HubInformation.HubDescriptor.bNumberOfPorts, parent_path);
CONFIGRET cr;
/* check if this is the device we are looking for */
- if (!(device_key = SetupDiOpenDevRegKey(device_info, &device_info_data,
- DICS_FLAG_GLOBAL, 0,
- DIREG_DEV, KEY_QUERY_VALUE)))
+ device_key = SetupDiOpenDevRegKey(device_info, &device_info_data,
+ DICS_FLAG_GLOBAL, 0,
+ DIREG_DEV, KEY_QUERY_VALUE);
+ if (device_key == INVALID_HANDLE_VALUE)
continue;
size = sizeof(value);
if (RegQueryValueExA(device_key, "PortName", NULL, &type, (LPBYTE)value,
free(escaped_port_name);
CloseHandle(handle);
- /* retrive USB device details from the device descriptor */
+ /* retrieve USB device details from the device descriptor */
get_usb_details(port, device_info_data.DevInst);
}
break;