Skip to content

Commit

Permalink
ARM: pxa: Improve a size determination in pxa3xx_u2d_probe()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Robert Jarzmik <[email protected]>
  • Loading branch information
elfring authored and rjarzmik committed Jun 14, 2017
1 parent c276557 commit 361f7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/pxa3xx-ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 361f7cc

Please sign in to comment.