git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: serial: visor: fix crash on detecting device without write_urbs
[pandora-kernel.git]
/
drivers
/
usb
/
serial
/
visor.c
diff --git
a/drivers/usb/serial/visor.c
b/drivers/usb/serial/visor.c
index
39678d5
..
ea74788
100644
(file)
--- a/
drivers/usb/serial/visor.c
+++ b/
drivers/usb/serial/visor.c
@@
-640,8
+640,10
@@
static int clie_5_attach(struct usb_serial *serial)
*/
/* some sanity check */
*/
/* some sanity check */
- if (serial->num_ports < 2)
- return -1;
+ if (serial->num_bulk_out < 2) {
+ dev_err(&serial->interface->dev, "missing bulk out endpoints\n");
+ return -ENODEV;
+ }
/* port 0 now uses the modified endpoint Address */
port = serial->port[0];
/* port 0 now uses the modified endpoint Address */
port = serial->port[0];