From: Markus Elfring Date: Sat, 17 Sep 2016 06:28:05 +0000 (+0200) Subject: ste_dma40: Improve a size determination in d40_of_probe() X-Git-Tag: v4.14-rc1~2349^2~3^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71660223f50036e67a2a66cf55815fa665639d3a;p=platform%2Fkernel%2Flinux-rpi.git 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: Markus Elfring Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 47acb61..4a651b2 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -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;