diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-22 13:16:06 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-22 13:16:06 -0700 |
commit | 34a0036748257dd97b22b76ef64aa44559f2ef6f (patch) | |
tree | 48384dca01f8fd8bbf566ca0df07e80b18d32fec /drivers/usb/gadget/function/f_fs.c | |
parent | a85c0f8db3329ab433dab49322616e6985317cd7 (diff) | |
parent | 0852659ef071ccd84e85e37195e7c2f3e7c64d1f (diff) | |
download | linux-stable-34a0036748257dd97b22b76ef64aa44559f2ef6f.tar.gz linux-stable-34a0036748257dd97b22b76ef64aa44559f2ef6f.tar.bz2 linux-stable-34a0036748257dd97b22b76ef64aa44559f2ef6f.zip |
Merge tag 'usb-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes:
usb: changes for v4.14 merge window
Not a big pull request this time around. Only 49 non-merge
commits. This pull request is, however, all over the place. Most of
the changes are in the bdc driver adding support for USB Phy layer and
PM.
Renesas adds support for R-Car H3 ES2.0 and R-Car M3-W SoCs.
Also here is PM_RUNTIME support for dwc3-keystone.
UDC Core got a DMA unmap fix to make sure we only unmap requests that
were, indeed, mapped.
Other than these, we have a lot of cleanups, many of them adding
'const' to several places.
Diffstat (limited to 'drivers/usb/gadget/function/f_fs.c')
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index d21874b35cf6..9990944a7245 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -961,10 +961,9 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data) /* In the meantime, endpoint got disabled or changed. */ ret = -ESHUTDOWN; } else if (halt) { - /* Halt */ - if (likely(epfile->ep == ep) && !WARN_ON(!ep->ep)) - usb_ep_set_halt(ep->ep); - ret = -EBADMSG; + ret = usb_ep_set_halt(ep->ep); + if (!ret) + ret = -EBADMSG; } else if (unlikely(data_len == -EINVAL)) { /* * Sanity Check: even though data_len can't be used |