Skip to content

Commit 24a85ba

Browse files
Oliver Neukumgregkh
authored andcommitted
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>
1 parent 4212cd7 commit 24a85ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/class/cdc-wdm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static int wdm_flush(struct file *file, fl_owner_t id)
531531
dev_err(&desc->intf->dev, "Error in flush path: %d\n",
532532
desc->werr);
533533

534-
return desc->werr;
534+
return usb_translate_errors(desc->werr);
535535
}
536536

537537
static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait)

0 commit comments

Comments
 (0)