summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/bdc
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2021-01-13 10:42:20 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-13 11:24:02 +0100
commit1c6e01bbe7712f81c2f81e7da8c08d0147b092be (patch)
treead0301295868f1277b06d29e8056a1fd4b9e5b71 /drivers/usb/gadget/udc/bdc
parente634ae98b807dd591a6c904c293df4285752f0a4 (diff)
usb: gadget: bdc: prefer pointer dereference to pointer type
Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Cc: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1610505748-30616-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc/bdc')
-rw-r--r--drivers/usb/gadget/udc/bdc/bdc_ep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c
index fafdc9fdb4a5..76463de75595 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_ep.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c
@@ -147,7 +147,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
/* Allocate memory for each table */
for (index = 0; index < num_tabs; index++) {
/* Allocate memory for bd_table structure */
- bd_table = kzalloc(sizeof(struct bd_table), GFP_ATOMIC);
+ bd_table = kzalloc(sizeof(*bd_table), GFP_ATOMIC);
if (!bd_table)
goto fail;