Skip to content
Snippets Groups Projects
Commit d0ef90b4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

USB: serial: fix DMA buffers on stack for io_edgeport.c


The original code was passing a stack variable as a dma buffer, so I
made it an allocated variable.  Instead of adding a bunch of kfree()
calls, I changed all the error return paths to gotos.

Also I noticed that the error checking wasn't correct because
usb_get_descriptor() can return negative values.

While I was at it, I made an unrelated white space change by moving
the unicode_to_ascii() on to one line.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 96679f6b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment