diff options
author | Sarah Sharp <sarah.a.sharp@intel.com> | 2007-10-25 19:58:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-25 21:18:45 +0200 |
commit | 8abaee238ebb1ef9b8bcafac7a1833f92e7f2319 (patch) | |
tree | 320bb5bc2dc5780c53762b4e3dcc6fc41343a0ae /drivers/usb | |
parent | USB: remove new OHCI build warnings (diff) | |
download | linux-8abaee238ebb1ef9b8bcafac7a1833f92e7f2319.tar.xz linux-8abaee238ebb1ef9b8bcafac7a1833f92e7f2319.zip |
USB: usb_serial_resume bug fix
Avoid potential null pointer dereference.
Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 426afaa0d9b8..497e29a700ca 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -1123,7 +1123,9 @@ int usb_serial_resume(struct usb_interface *intf) { struct usb_serial *serial = usb_get_intfdata(intf); - return serial->type->resume(serial); + if (serial->type->resume) + return serial->type->resume(serial); + return 0; } EXPORT_SYMBOL(usb_serial_resume); |