提交 2d403903 编写于 作者: W Wolfram Sang 提交者: Greg Kroah-Hartman

usb: misc: ldusb: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.
Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5656bbb7
...@@ -714,10 +714,8 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -714,10 +714,8 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
goto error; goto error;
} }
dev->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL); dev->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->interrupt_in_urb) { if (!dev->interrupt_in_urb)
dev_err(&intf->dev, "Couldn't allocate interrupt_in_urb\n");
goto error; goto error;
}
dev->interrupt_out_endpoint_size = dev->interrupt_out_endpoint ? usb_endpoint_maxp(dev->interrupt_out_endpoint) : dev->interrupt_out_endpoint_size = dev->interrupt_out_endpoint ? usb_endpoint_maxp(dev->interrupt_out_endpoint) :
udev->descriptor.bMaxPacketSize0; udev->descriptor.bMaxPacketSize0;
dev->interrupt_out_buffer = kmalloc(write_buffer_size*dev->interrupt_out_endpoint_size, GFP_KERNEL); dev->interrupt_out_buffer = kmalloc(write_buffer_size*dev->interrupt_out_endpoint_size, GFP_KERNEL);
...@@ -726,10 +724,8 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id * ...@@ -726,10 +724,8 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
goto error; goto error;
} }
dev->interrupt_out_urb = usb_alloc_urb(0, GFP_KERNEL); dev->interrupt_out_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->interrupt_out_urb) { if (!dev->interrupt_out_urb)
dev_err(&intf->dev, "Couldn't allocate interrupt_out_urb\n");
goto error; goto error;
}
dev->interrupt_in_interval = min_interrupt_in_interval > dev->interrupt_in_endpoint->bInterval ? min_interrupt_in_interval : dev->interrupt_in_endpoint->bInterval; dev->interrupt_in_interval = min_interrupt_in_interval > dev->interrupt_in_endpoint->bInterval ? min_interrupt_in_interval : dev->interrupt_in_endpoint->bInterval;
if (dev->interrupt_out_endpoint) if (dev->interrupt_out_endpoint)
dev->interrupt_out_interval = min_interrupt_out_interval > dev->interrupt_out_endpoint->bInterval ? min_interrupt_out_interval : dev->interrupt_out_endpoint->bInterval; dev->interrupt_out_interval = min_interrupt_out_interval > dev->interrupt_out_endpoint->bInterval ? min_interrupt_out_interval : dev->interrupt_out_endpoint->bInterval;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册