summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/usb_wwan.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-11-16 15:47:18 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-11-16 15:47:18 (GMT)
commitec0148736f54667641e3e24fa06d47db01d4ba7e (patch)
treebc3c99a1275e64087f14ce35278f2c522e66c78e /drivers/usb/serial/usb_wwan.c
parentd6ee1a2894c445a0bed1d2dc04e8f13f1f6c0311 (diff)
parente592c5d0b7db94b485b4a2342db041a1882b7f75 (diff)
downloadlinux-ec0148736f54667641e3e24fa06d47db01d4ba7e.tar.xz
Merge tag 'usb-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman: "Here are some USB fixes for the 3.7 tree. Nothing huge here, just a number of tiny bugfixes resolving issues that have been found, and two reverts of patches that were found to have caused problems. All of these have been in linux-next already. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Revert "USB/host: Cleanup unneccessary irq disable code" USB: option: add Alcatel X220/X500D USB IDs USB: option: add Novatel E362 and Dell Wireless 5800 USB IDs USB: keyspan: fix typo causing GPF on open USB: fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled USB: usb_wwan: fix bulk-urb allocation usb: otg: Fix build errors if USB_MUSB_OMAP2PLUS is selected as module usb: musb: ux500: fix 'musbid' undeclared error in ux500_remove() Revert "usb: musb: use DMA mode 1 whenever possible"
Diffstat (limited to 'drivers/usb/serial/usb_wwan.c')
-rw-r--r--drivers/usb/serial/usb_wwan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index 61a73ad..a3e9c09 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -455,9 +455,6 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
struct usb_serial *serial = port->serial;
struct urb *urb;
- if (endpoint == -1)
- return NULL; /* endpoint not needed */
-
urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
if (urb == NULL) {
dev_dbg(&serial->interface->dev,
@@ -489,6 +486,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port)
init_usb_anchor(&portdata->delayed);
for (i = 0; i < N_IN_URB; i++) {
+ if (!port->bulk_in_size)
+ break;
+
buffer = (u8 *)__get_free_page(GFP_KERNEL);
if (!buffer)
goto bail_out_error;
@@ -502,8 +502,8 @@ int usb_wwan_port_probe(struct usb_serial_port *port)
}
for (i = 0; i < N_OUT_URB; i++) {
- if (port->bulk_out_endpointAddress == -1)
- continue;
+ if (!port->bulk_out_size)
+ break;
buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL);
if (!buffer)