]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ARM: pxa: Improve a size determination in pxa3xx_u2d_probe()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 3 Jun 2017 19:43:11 +0000 (21:43 +0200)
committerRobert Jarzmik <robert.jarzmik@free.fr>
Wed, 14 Jun 2017 06:32:21 +0000 (08:32 +0200)
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: Robert Jarzmik <robert.jarzmik@free.fr>
arch/arm/mach-pxa/pxa3xx-ulpi.c

index eba595fac8cad426429079d72fde415028f5d7c6..13f9909ac8bffebe9dabd48578b170fe0eb538cb 100644 (file)
@@ -286,7 +286,7 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev)
        struct resource *r;
        int err;
 
-       u2d = kzalloc(sizeof(struct pxa3xx_u2d_ulpi), GFP_KERNEL);
+       u2d = kzalloc(sizeof(*u2d), GFP_KERNEL);
        if (!u2d) {
                dev_err(&pdev->dev, "failed to allocate memory\n");
                return -ENOMEM;