aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-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 61a73ad1a187..a3e9c095f0d8 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,
455 struct usb_serial *serial = port->serial; 455 struct usb_serial *serial = port->serial;
456 struct urb *urb; 456 struct urb *urb;
457 457
458 if (endpoint == -1)
459 return NULL; /* endpoint not needed */
460
461 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ 458 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
462 if (urb == NULL) { 459 if (urb == NULL) {
463 dev_dbg(&serial->interface->dev, 460 dev_dbg(&serial->interface->dev,
@@ -489,6 +486,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port)
489 init_usb_anchor(&portdata->delayed); 486 init_usb_anchor(&portdata->delayed);
490 487
491 for (i = 0; i < N_IN_URB; i++) { 488 for (i = 0; i < N_IN_URB; i++) {
489 if (!port->bulk_in_size)
490 break;
491
492 buffer = (u8 *)__get_free_page(GFP_KERNEL); 492 buffer = (u8 *)__get_free_page(GFP_KERNEL);
493 if (!buffer) 493 if (!buffer)
494 goto bail_out_error; 494 goto bail_out_error;
@@ -502,8 +502,8 @@ int usb_wwan_port_probe(struct usb_serial_port *port)
502 } 502 }
503 503
504 for (i = 0; i < N_OUT_URB; i++) { 504 for (i = 0; i < N_OUT_URB; i++) {
505 if (port->bulk_out_endpointAddress == -1) 505 if (!port->bulk_out_size)
506 continue; 506 break;
507 507
508 buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); 508 buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL);
509 if (!buffer) 509 if (!buffer)