]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 1 Jun 2017 19:48:11 +0000 (21:48 +0200)
committerTony Lindgren <tony@atomide.com>
Wed, 7 Jun 2017 06:53:49 +0000 (23:53 -0700)
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 <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/dma.c

index c821c1d5610ef25c56e1c0873452a019a602380d..823dba3dc033caacfb37c245268e410e32a36cc8 100644 (file)
@@ -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);