Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd95b814 authored by Pete Zaitcev's avatar Pete Zaitcev Committed by Greg Kroah-Hartman
Browse files

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: default avatarPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 79592b72
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -210,9 +210,9 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, l


static struct async *alloc_async(unsigned int numisoframes)
static struct async *alloc_async(unsigned int numisoframes)
{
{
        unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct usb_iso_packet_descriptor);
	struct async *as;
        struct async *as = kzalloc(assize, GFP_KERNEL);


	as = kzalloc(sizeof(struct async), GFP_KERNEL);
        if (!as)
        if (!as)
                return NULL;
                return NULL;
	as->urb = usb_alloc_urb(numisoframes, GFP_KERNEL);
	as->urb = usb_alloc_urb(numisoframes, GFP_KERNEL);