Commit 8abaee23 authored by Sarah Sharp's avatar Sarah Sharp Committed by Greg Kroah-Hartman

USB: usb_serial_resume bug fix

Avoid potential null pointer dereference.
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da6fb570
...@@ -1123,7 +1123,9 @@ int usb_serial_resume(struct usb_interface *intf) ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment