Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71660223 authored by Markus Elfring's avatar Markus Elfring Committed by Vinod Koul
Browse files

ste_dma40: Improve a size determination in d40_of_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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent abac5bac
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -3489,9 +3489,7 @@ static int __init d40_of_probe(struct platform_device *pdev,
	int num_phy = 0, num_memcpy = 0, num_disabled = 0;
	const __be32 *list;

	pdata = devm_kzalloc(&pdev->dev,
			     sizeof(struct stedma40_platform_data),
			     GFP_KERNEL);
	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
	if (!pdata)
		return -ENOMEM;