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>
This commit is contained in:
Sarah Sharp 2007-10-25 10:58:43 -07:00 committed by Greg Kroah-Hartman
parent da6fb5704f
commit 8abaee238e

View File

@ -1123,7 +1123,9 @@ int usb_serial_resume(struct usb_interface *intf)
{ {
struct usb_serial *serial = usb_get_intfdata(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); EXPORT_SYMBOL(usb_serial_resume);