diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-06-03 15:43:11 -0400 |
---|---|---|
committer | Robert Jarzmik <robert.jarzmik@free.fr> | 2017-06-14 02:32:21 -0400 |
commit | 361f7cc7f33607489bea815f9148e8e9a13ea673 (patch) | |
tree | e883e0e967e2e4982540bf08c28db5e3c0954a59 | |
parent | c276557de3087ef67ad1aec4222f9f8b1d005f80 (diff) |
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 <elfring@users.sourceforge.net>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
286 | struct resource *r; | 286 | struct resource *r; |
287 | int err; | 287 | int err; |
288 | 288 | ||
289 | u2d = kzalloc(sizeof(struct pxa3xx_u2d_ulpi), GFP_KERNEL); | 289 | u2d = kzalloc(sizeof(*u2d), GFP_KERNEL); |
290 | if (!u2d) { | 290 | if (!u2d) { |
291 | dev_err(&pdev->dev, "failed to allocate memory\n"); | 291 | dev_err(&pdev->dev, "failed to allocate memory\n"); |
292 | return -ENOMEM; | 292 | return -ENOMEM; |