aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-wdm.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2012-04-27 08:23:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-29 21:53:41 -0400
commit24a85bae5da2b43fed423859c09c5a81ab359473 (patch)
tree0a114eefc3881666d84115ecf3e6a77a8f133d1c /drivers/usb/class/cdc-wdm.c
parent4212cd74ca6f0c42f5a0065797dd1c310a485ad8 (diff)
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>
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r--drivers/usb/class/cdc-wdm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index c6f6560d436c..b29a9815e4d2 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -531,7 +531,7 @@ static int wdm_flush(struct file *file, fl_owner_t id)
531 dev_err(&desc->intf->dev, "Error in flush path: %d\n", 531 dev_err(&desc->intf->dev, "Error in flush path: %d\n",
532 desc->werr); 532 desc->werr);
533 533
534 return desc->werr; 534 return usb_translate_errors(desc->werr);
535} 535}
536 536
537static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait) 537static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait)