--- zzzz-none-000/linux-3.10.107/drivers/usb/atm/speedtch.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/usb/atm/speedtch.c 2021-02-04 17:41:59.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -256,7 +255,8 @@ usb_dbg(usbatm, "%s entered\n", __func__); - if (!(buffer = (unsigned char *)__get_free_page(GFP_KERNEL))) { + buffer = (unsigned char *)__get_free_page(GFP_KERNEL); + if (!buffer) { ret = -ENOMEM; usb_dbg(usbatm, "%s: no memory for buffer!\n", __func__); goto out; @@ -639,7 +639,8 @@ goto fail; } - if ((int_urb = instance->int_urb)) { + int_urb = instance->int_urb; + if (int_urb) { ret = usb_submit_urb(int_urb, GFP_ATOMIC); schedule_work(&instance->status_check_work); if (ret < 0) { @@ -651,7 +652,8 @@ return; fail: - if ((int_urb = instance->int_urb)) + int_urb = instance->int_urb; + if (int_urb) mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY)); } @@ -760,11 +762,13 @@ struct usb_interface *cur_intf; int i; - for (i = 0; i < num_interfaces; i++) - if ((cur_intf = usb_ifnum_to_if(usb_dev, i))) { + for (i = 0; i < num_interfaces; i++) { + cur_intf = usb_ifnum_to_if(usb_dev, i); + if (cur_intf) { usb_set_intfdata(cur_intf, NULL); usb_driver_release_interface(&speedtch_usb_driver, cur_intf); } + } } static int speedtch_bind(struct usbatm_data *usbatm, @@ -788,7 +792,8 @@ return -ENODEV; } - if (!(data_intf = usb_ifnum_to_if(usb_dev, INTERFACE_DATA))) { + data_intf = usb_ifnum_to_if(usb_dev, INTERFACE_DATA); + if (!data_intf) { usb_err(usbatm, "%s: data interface not found!\n", __func__); return -ENODEV; } @@ -888,7 +893,7 @@ usb_fill_int_urb(instance->int_urb, usb_dev, usb_rcvintpipe(usb_dev, ENDPOINT_INT), instance->int_data, sizeof(instance->int_data), - speedtch_handle_int, instance, 50); + speedtch_handle_int, instance, 16); else usb_dbg(usbatm, "%s: no memory for interrupt urb!\n", __func__);