Commit aa40700f authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Only read EVIOCGID result if the ioctl succeeded.

parent acff5b41
......@@ -1135,13 +1135,16 @@ static void try_add_device(struct udev_device *dev)
if (ioctl(fd, EVIOCGID, &device_id) < 0)
WARN("ioctl(EVIOCGID) failed: %d %s\n", errno, strerror(errno));
else
{
vid = device_id.vendor;
pid = device_id.product;
version = device_id.version;
}
device_uid[0] = 0;
if (ioctl(fd, EVIOCGUNIQ(254), device_uid) >= 0 && device_uid[0])
serial = strdupAtoW(device_uid);
vid = device_id.vendor;
pid = device_id.product;
version = device_id.version;
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment