From: Markus Elfring Date: Sat, 3 Jun 2017 19:43:11 +0000 (+0200) Subject: ARM: pxa: Improve a size determination in pxa3xx_u2d_probe() X-Git-Tag: v4.13-rc1~169^2~11^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=361f7cc7f33607489bea815f9148e8e9a13ea673;p=karo-tx-linux.git ARM: pxa: Improve a size determination in pxa3xx_u2d_probe() 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: Robert Jarzmik --- diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index eba595fac8ca..13f9909ac8bf 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c @@ -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;