From: Pete Zaitcev <zaitcev@redhat.com> Date: Sat, 5 Jan 2008 10:01:07 +0000 (-0800) Subject: USB: usbfs: struct async is a fixed size structure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd95b814115e45e0bf800f2950b9941c86e68172;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git USB: usbfs: struct async is a fixed size structure 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> --- diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 32e5591ae7b1..e661994ad18d 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -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);