1
0
Fork 0

USB: cdc-wdm: sanitize error returns

wdm_flush() returns unsanitized USB error codes.
They must be cleaned up to before being anded to user space

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Oliver Neukum 2012-04-27 14:23:54 +02:00 committed by Greg Kroah-Hartman
parent 4212cd74ca
commit 24a85bae5d
1 changed files with 1 additions and 1 deletions

View File

@ -531,7 +531,7 @@ static int wdm_flush(struct file *file, fl_owner_t id)
dev_err(&desc->intf->dev, "Error in flush path: %d\n",
desc->werr);
return desc->werr;
return usb_translate_errors(desc->werr);
}
static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait)