Skip to content

Commit

Permalink
USB: usbfs: struct async is a fixed size structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Zaitcev authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent 79592b7 commit dd95b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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);
Expand Down

0 comments on commit dd95b81

Please sign in to comment.