Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8abaee238ebb1ef9b8bcafac7a1833f92e7f2319
Commit:     8abaee238ebb1ef9b8bcafac7a1833f92e7f2319
Parent:     da6fb5704feeadd10b99a1025166f1a3f627825d
Author:     Sarah Sharp <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 25 10:58:43 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 12:18:45 2007 -0700

    USB: usb_serial_resume bug fix
    
    Avoid potential null pointer dereference.
    
    Signed-off-by: Sarah Sharp <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/usb-serial.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 426afaa..497e29a 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);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to