提交 8abaee23 编写于 作者: S Sarah Sharp 提交者: Greg Kroah-Hartman

USB: usb_serial_resume bug fix

Avoid potential null pointer dereference.
Signed-off-by: NSarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 da6fb570
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册