From e74e83724808b72173b557bd8008202109fb6091 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 8 Sep 2016 09:34:32 -0300 Subject: [PATCH] usb: chipidea: udc: Use the preferred form for passing a size of a struct According to Documentation/CodingStyle: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); " , so do as suggested to improve readability. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen --- drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 22534a1..661f43f 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1993,7 +1993,7 @@ int ci_hdrc_gadget_init(struct ci_hdrc *ci) if (!hw_read(ci, CAP_DCCPARAMS, DCCPARAMS_DC)) return -ENXIO; - rdrv = devm_kzalloc(ci->dev, sizeof(struct ci_role_driver), GFP_KERNEL); + rdrv = devm_kzalloc(ci->dev, sizeof(*rdrv), GFP_KERNEL); if (!rdrv) return -ENOMEM; -- 2.7.4