Skip to content

Commit

Permalink
USB: usb_serial_resume bug fix
Browse files Browse the repository at this point in the history
Avoid potential null pointer dereference.

Signed-off-by: Sarah Sharp <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Sarah Sharp authored and gregkh committed Oct 25, 2007
1 parent da6fb57 commit 8abaee2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8abaee2

Please sign in to comment.