aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@intel.com>2007-10-25 13:58:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-25 15:18:45 -0400
commit8abaee238ebb1ef9b8bcafac7a1833f92e7f2319 (patch)
tree320bb5bc2dc5780c53762b4e3dcc6fc41343a0ae
parentda6fb5704feeadd10b99a1025166f1a3f627825d (diff)
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>
-rw-r--r--drivers/usb/serial/usb-serial.c4
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)
1123{ 1123{
1124 struct usb_serial *serial = usb_get_intfdata(intf); 1124 struct usb_serial *serial = usb_get_intfdata(intf);
1125 1125
1126 return serial->type->resume(serial); 1126 if (serial->type->resume)
1127 return serial->type->resume(serial);
1128 return 0;
1127} 1129}
1128EXPORT_SYMBOL(usb_serial_resume); 1130EXPORT_SYMBOL(usb_serial_resume);
1129 1131