]> Git Repo - linux.git/blobdiff - drivers/usb/core/hub.c
brd: remove support for BLKFLSBUF
[linux.git] / drivers / usb / core / hub.c
index 1d5fc32d06d007a6f64526a531da8ae69e8e6950..cbb146736f577da8a060d49b17052af78881adfa 100644 (file)
@@ -1823,10 +1823,8 @@ descriptor_error:
        dev_info(&intf->dev, "USB hub found\n");
 
        hub = kzalloc(sizeof(*hub), GFP_KERNEL);
-       if (!hub) {
-               dev_dbg(&intf->dev, "couldn't kmalloc hub struct\n");
+       if (!hub)
                return -ENOMEM;
-       }
 
        kref_init(&hub->kref);
        hub->intfdev = &intf->dev;
@@ -3106,7 +3104,7 @@ static int usb_disable_remote_wakeup(struct usb_device *udev)
                                USB_CTRL_SET_TIMEOUT);
        else
                return usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                               USB_REQ_CLEAR_FEATURE, USB_RECIP_INTERFACE,
+                               USB_REQ_SET_FEATURE, USB_RECIP_INTERFACE,
                                USB_INTRF_FUNC_SUSPEND, 0, NULL, 0,
                                USB_CTRL_SET_TIMEOUT);
 }
@@ -5337,11 +5335,10 @@ static int descriptors_changed(struct usb_device *udev,
        }
 
        buf = kmalloc(len, GFP_NOIO);
-       if (buf == NULL) {
-               dev_err(&udev->dev, "no mem to re-read configs after reset\n");
+       if (!buf)
                /* assume the worst */
                return 1;
-       }
+
        for (index = 0; index < udev->descriptor.bNumConfigurations; index++) {
                old_length = le16_to_cpu(udev->config[index].desc.wTotalLength);
                length = usb_get_descriptor(udev, USB_DT_CONFIG, index, buf,
This page took 0.03699 seconds and 4 git commands to generate.