diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-10-18 15:16:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-21 12:47:56 +0200 |
commit | 6a47856145346c2dc5f31e1b5f9d986f1e446ce2 (patch) | |
tree | 72acaf229933de3d606d984cc8d118dd4c4af3c3 | |
parent | usb: host: fotg210: Make use of dma_pool_zalloc() instead of dma_pool_alloc/m... (diff) | |
download | linux-6a47856145346c2dc5f31e1b5f9d986f1e446ce2.tar.xz linux-6a47856145346c2dc5f31e1b5f9d986f1e446ce2.zip |
usb: host: ehci: Make use of dma_pool_zalloc() instead of dma_pool_alloc/memset()
Replacing dma_pool_alloc/memset() with dma_pool_zalloc()
to simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20211018131645.434-1-caihuoqing@baidu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/ehci-mem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c index 21307d862af6..4c6c08b675b5 100644 --- a/drivers/usb/host/ehci-mem.c +++ b/drivers/usb/host/ehci-mem.c @@ -73,10 +73,9 @@ static struct ehci_qh *ehci_qh_alloc (struct ehci_hcd *ehci, gfp_t flags) if (!qh) goto done; qh->hw = (struct ehci_qh_hw *) - dma_pool_alloc(ehci->qh_pool, flags, &dma); + dma_pool_zalloc(ehci->qh_pool, flags, &dma); if (!qh->hw) goto fail; - memset(qh->hw, 0, sizeof *qh->hw); qh->qh_dma = dma; // INIT_LIST_HEAD (&qh->qh_list); INIT_LIST_HEAD (&qh->qtd_list); |