From: Fabio Estevam Date: Thu, 8 Sep 2016 12:34:32 +0000 (-0300) Subject: usb: chipidea: udc: Use the preferred form for passing a size of a struct X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e74e83724808b72173b557bd8008202109fb6091;p=linux-beck.git 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 --- diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 22534a1622d9..661f43fe0f9e 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;