]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_fs: Pass along set_halt errors.
authorJerry Zhang <zhangjerry@google.com>
Fri, 11 Aug 2017 22:46:08 +0000 (15:46 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 Aug 2017 11:18:59 +0000 (14:18 +0300)
commit3722b9a5e60318f7998a8e46675e8d8d02edee04
tree5f551dff98f008f680eebb8d9767aed4002c2c00
parenta9d8488adc8c242dc4262302e73feb90dc83b6aa
usb: gadget: f_fs: Pass along set_halt errors.

Users can apply i/o in the wrong direction on an
endpoint to stall it. In case there is an error
that does not allow the endpoint to be stalled,
we want the user to know.

An operation to stall the endpoint will return
EBADMSG if successful, EAGAIN if there are still
queued requests, and other errors depending on
the underlying implementation.

Also remove the conditional since it is always true.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Jerry Zhang <zhangjerry@google.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_fs.c