projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4212cd7
)
USB: cdc-wdm: sanitize error returns
author
Oliver Neukum
<oliver@neukum.org>
Fri, 27 Apr 2012 12:23:54 +0000
(14:23 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 30 Apr 2012 01:53:41 +0000
(21:53 -0400)
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>
drivers/usb/class/cdc-wdm.c
patch
|
blob
|
history
diff --git
a/drivers/usb/class/cdc-wdm.c
b/drivers/usb/class/cdc-wdm.c
index c6f6560d436c804bba1f539a2b6cd1c12be8633d..b29a9815e4d2f76c1c5b423e5dd18d3f52174afa 100644
(file)
--- 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)
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)