|
@@ -466,6 +466,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port)
|
|
|
int err;
|
|
|
int i;
|
|
|
|
|
|
+ if (!port->bulk_in_size || !port->bulk_out_size)
|
|
|
+ return -ENODEV;
|
|
|
+
|
|
|
portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
|
|
|
if (!portdata)
|
|
|
return -ENOMEM;
|
|
@@ -473,9 +476,6 @@ 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;
|
|
@@ -489,9 +489,6 @@ int usb_wwan_port_probe(struct usb_serial_port *port)
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < N_OUT_URB; i++) {
|
|
|
- if (!port->bulk_out_size)
|
|
|
- break;
|
|
|
-
|
|
|
buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL);
|
|
|
if (!buffer)
|
|
|
goto bail_out_error2;
|