summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-10-18 16:17:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-21 13:47:55 +0300
commit81dddf72ac6db1c3a0f4f3e4137d01aa960bf1c0 (patch)
treef21d7cc12f0145f8ec2a4a0eaa12019244f0348d
parentb851f7c7b8fd5365e447bb60e1e18eb6de628507 (diff)
downloadlinux-81dddf72ac6db1c3a0f4f3e4137d01aa960bf1c0.tar.xz
usb: host: fotg210: 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/20211018131709.487-1-caihuoqing@baidu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/fotg210-hcd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 296452625488..b590995a6b3e 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -1859,10 +1859,9 @@ static struct fotg210_qh *fotg210_qh_alloc(struct fotg210_hcd *fotg210,
if (!qh)
goto done;
qh->hw = (struct fotg210_qh_hw *)
- dma_pool_alloc(fotg210->qh_pool, flags, &dma);
+ dma_pool_zalloc(fotg210->qh_pool, flags, &dma);
if (!qh->hw)
goto fail;
- memset(qh->hw, 0, sizeof(*qh->hw));
qh->qh_dma = dma;
INIT_LIST_HEAD(&qh->qtd_list);