USB: usbfs: struct async is a fixed size structure
authorPete Zaitcev <zaitcev@redhat.com>
Sat, 5 Jan 2008 10:01:07 +0000 (02:01 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:35:02 +0000 (14:35 -0800)
The ISO descriptors are allocated separately in proc_submiturb for a fetch
from user mode, then tucked at the end of URB. This seems like a dead code.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c

index 32e5591..e661994 100644 (file)
@@ -210,9 +210,9 @@ err:
 
 static struct async *alloc_async(unsigned int numisoframes)
 {
-        unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct usb_iso_packet_descriptor);
-        struct async *as = kzalloc(assize, GFP_KERNEL);
+       struct async *as;
 
+       as = kzalloc(sizeof(struct async), GFP_KERNEL);
         if (!as)
                 return NULL;
        as->urb = usb_alloc_urb(numisoframes, GFP_KERNEL);