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
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
[pandora-kernel.git]
/
drivers
/
usb
/
serial
/
usb-serial.c
diff --git
a/drivers/usb/serial/usb-serial.c
b/drivers/usb/serial/usb-serial.c
index
6954de5
..
546a521
100644
(file)
--- a/
drivers/usb/serial/usb-serial.c
+++ b/
drivers/usb/serial/usb-serial.c
@@
-1344,11
+1344,15
@@
int usb_serial_register(struct usb_serial_driver *driver)
return -ENODEV;
fixup_generic(driver);
return -ENODEV;
fixup_generic(driver);
- if (driver->usb_driver)
- driver->usb_driver->supports_autosuspend = 1;
if (!driver->description)
driver->description = driver->driver.name;
if (!driver->description)
driver->description = driver->driver.name;
+ if (!driver->usb_driver) {
+ WARN(1, "Serial driver %s has no usb_driver\n",
+ driver->description);
+ return -EINVAL;
+ }
+ driver->usb_driver->supports_autosuspend = 1;
/* Add this device to our list of devices */
mutex_lock(&table_lock);
/* Add this device to our list of devices */
mutex_lock(&table_lock);