Commit 24a85bae authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

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: default avatarOliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4212cd74
...@@ -531,7 +531,7 @@ static int wdm_flush(struct file *file, fl_owner_t id) ...@@ -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", dev_err(&desc->intf->dev, "Error in flush path: %d\n",
desc->werr); desc->werr);
return desc->werr; return usb_translate_errors(desc->werr);
} }
static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait) static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment