From: Markus Elfring Date: Thu, 1 Jun 2017 19:48:11 +0000 (+0200) Subject: ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() X-Git-Tag: v4.13-rc1~169^2~14^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d27a30bbc8b0c84a4cc922b201f9e85e9a2de741;p=karo-tx-linux.git ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init() Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index c821c1d5610e..823dba3dc033 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -339,7 +339,7 @@ static int __init omap1_system_dma_init(void) goto exit_iounmap; } - d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); + d = kzalloc(sizeof(*d), GFP_KERNEL); if (!d) { dev_err(&pdev->dev, "%s: Unable to allocate 'd' for %s\n", __func__, pdev->name);