From: Sarah Sharp Date: Thu, 25 Oct 2007 17:58:43 +0000 (-0700) Subject: USB: usb_serial_resume bug fix X-Git-Tag: v2.6.24-rc2~136^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8abaee238ebb1ef9b8bcafac7a1833f92e7f2319;p=linux-2.6-omap-h63xx.git USB: usb_serial_resume bug fix Avoid potential null pointer dereference. Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 426afaa0d9b..497e29a700c 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -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);