diff options
| author | 2017-05-18 09:24:30 -0400 | |
|---|---|---|
| committer | 2017-05-18 09:24:30 -0400 | |
| commit | 6b7781b42dc9bc9bcd1523b6c24b876cdda0bef3 (patch) | |
| tree | ee55c67e4ea30b9eb44f301ba0bde2e631a26162 /drivers/usb/misc/lvstest.c | |
| parent | drm/sti:fix spelling mistake: "compoment" -> "component" (diff) | |
| parent | Merge tag 'drm-misc-next-2017-05-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next (diff) | |
| download | linux-dev-6b7781b42dc9bc9bcd1523b6c24b876cdda0bef3.tar.xz linux-dev-6b7781b42dc9bc9bcd1523b6c24b876cdda0bef3.zip | |
Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next
Picking up drm-next @ 4.12-rc1 in order to apply Michal Hocko's vmalloc patch set
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/usb/misc/lvstest.c')
| -rw-r--r-- | drivers/usb/misc/lvstest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c index d3d124753266..2142132a1f82 100644 --- a/drivers/usb/misc/lvstest.c +++ b/drivers/usb/misc/lvstest.c @@ -193,7 +193,7 @@ static ssize_t u2_timeout_store(struct device *dev, return ret; } - if (val < 0 || val > 127) + if (val > 127) return -EINVAL; ret = lvs_rh_set_port_feature(hdev, lvs->portnum | (val << 8), @@ -222,7 +222,7 @@ static ssize_t u1_timeout_store(struct device *dev, return ret; } - if (val < 0 || val > 127) + if (val > 127) return -EINVAL; ret = lvs_rh_set_port_feature(hdev, lvs->portnum | (val << 8), @@ -367,10 +367,9 @@ static int lvs_rh_probe(struct usb_interface *intf, hdev = interface_to_usbdev(intf); desc = intf->cur_altsetting; - if (desc->desc.bNumEndpoints < 1) - return -ENODEV; - - endpoint = &desc->endpoint[0].desc; + ret = usb_find_int_in_endpoint(desc, &endpoint); + if (ret) + return ret; /* valid only for SS root hub */ if (hdev->descriptor.bDeviceProtocol != USB_HUB_PR_SS || hdev->parent) { @@ -433,6 +432,7 @@ static void lvs_rh_disconnect(struct usb_interface *intf) struct lvs_rh *lvs = usb_get_intfdata(intf); sysfs_remove_group(&intf->dev.kobj, &lvs_attr_group); + usb_poison_urb(lvs->urb); /* used in scheduled work */ flush_work(&lvs->rh_work); usb_free_urb(lvs->urb); } |
