提交 71574a55 编写于 作者: W Wolfram Sang 提交者: Greg Kroah-Hartman

usb: misc: adutux: 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>
上级 c3014d33
...@@ -744,20 +744,16 @@ static int adu_probe(struct usb_interface *interface, ...@@ -744,20 +744,16 @@ static int adu_probe(struct usb_interface *interface,
memset(dev->interrupt_in_buffer, 'i', in_end_size); memset(dev->interrupt_in_buffer, 'i', in_end_size);
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(&interface->dev, "Couldn't allocate interrupt_in_urb\n");
goto error; goto error;
}
dev->interrupt_out_buffer = kmalloc(out_end_size, GFP_KERNEL); dev->interrupt_out_buffer = kmalloc(out_end_size, GFP_KERNEL);
if (!dev->interrupt_out_buffer) { if (!dev->interrupt_out_buffer) {
dev_err(&interface->dev, "Couldn't allocate interrupt_out_buffer\n"); dev_err(&interface->dev, "Couldn't allocate interrupt_out_buffer\n");
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(&interface->dev, "Couldn't allocate interrupt_out_urb\n");
goto error; goto error;
}
if (!usb_string(udev, udev->descriptor.iSerialNumber, dev->serial_number, if (!usb_string(udev, udev->descriptor.iSerialNumber, dev->serial_number,
sizeof(dev->serial_number))) { sizeof(dev->serial_number))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册