]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/r8a66597-hcd.c
USB: r8a66597-hcd: fix NULL access
[linux-2.6-omap-h63xx.git] / drivers / usb / host / r8a66597-hcd.c
index af13f1f2296aa9402088d91287e76e6e20262009..a7a7070c6e2ac9d9d8c10d815a0c38e3169775ca 100644 (file)
@@ -47,7 +47,7 @@ MODULE_DESCRIPTION("R8A66597 USB Host Controller Driver");
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Yoshihiro Shimoda");
 
-#define DRIVER_VERSION "9 May 2007"
+#define DRIVER_VERSION "29 May 2007"
 
 static const char hcd_name[] = "r8a66597_hcd";
 
@@ -544,6 +544,9 @@ static void pipe_toggle_restore(struct r8a66597 *r8a66597,
        unsigned char endpoint = usb_pipeendpoint(urb->pipe);
        unsigned short *toggle = get_toggle_pointer(dev, urb->pipe);
 
+       if (!toggle)
+               return;
+
        r8a66597_pipe_toggle(r8a66597, pipe, *toggle & (1 << endpoint));
 }