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: dfba2174dc
("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>
This commit is contained in:
parent
aa15d3d257
commit
33369d5a20
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue