mirror of https://gitee.com/openkylin/linux.git
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:
parent
da6fb5704f
commit
8abaee238e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue