diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2017-12-11 09:38:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-12 13:16:07 +0100 |
commit | 33369d5a20549ac371f1f20f389f58246acc7621 (patch) | |
tree | 8bb0f73aac4f1077e59b03b4a685e42824455954 /drivers/usb/host | |
parent | USB: remove the URB_NO_FSBR flag (diff) | |
download | linux-33369d5a20549ac371f1f20f389f58246acc7621.tar.xz linux-33369d5a20549ac371f1f20f389f58246acc7621.zip |
xhci: fixup incorrect memset size parameter when clearing up DbC on exit.
Incorrect size was given to memset when zeroing the DbC endpoint
structures on exit. Use element size * ARRAY_SIZE to fix it
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-dbgcap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index 671e5023e683..452df0f87d6e 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -366,7 +366,7 @@ static void xhci_dbc_eps_exit(struct xhci_hcd *xhci) { struct xhci_dbc *dbc = xhci->dbc; - memset(dbc->eps, 0, ARRAY_SIZE(dbc->eps)); + memset(dbc->eps, 0, sizeof(struct dbc_ep) * ARRAY_SIZE(dbc->eps)); } static int xhci_dbc_mem_init(struct xhci_hcd *xhci, gfp_t flags) |