summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorMarkus Elfring2016-09-17 08:28:05 +0200
committerVinod Koul2016-09-26 19:36:17 +0200
commit71660223f50036e67a2a66cf55815fa665639d3a (patch)
tree52931bf361d7cff20d1ed1d063e46cb396691629 /drivers/dma/ste_dma40.c
parentste_dma40: Move an assignment in d40_lcla_allocate() (diff)
downloadkernel-qcow2-linux-71660223f50036e67a2a66cf55815fa665639d3a.tar.gz
kernel-qcow2-linux-71660223f50036e67a2a66cf55815fa665639d3a.tar.xz
kernel-qcow2-linux-71660223f50036e67a2a66cf55815fa665639d3a.zip
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 <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 47acb61cb15a..4a651b23e577 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;