summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/dma.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-10-03 20:46:48 +0200
committerTony Lindgren <tony@atomide.com>2017-10-11 20:13:04 +0200
commit16e7ea5380258c75e8c79c1737cc72ce2573d3b8 (patch)
tree2d33e21b4149e5001997fd4d516de0a4168dbbd3 /arch/arm/plat-omap/dma.c
parentARM: OMAP: Delete an error message for a failed memory allocation in two func... (diff)
downloadlinux-16e7ea5380258c75e8c79c1737cc72ce2573d3b8.tar.xz
linux-16e7ea5380258c75e8c79c1737cc72ce2573d3b8.zip
ARM: OMAP: Improve a size determination in two functions
Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r--arch/arm/plat-omap/dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 6ede0427548c..409e4ecaebe9 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1316,7 +1316,7 @@ static int omap_system_dma_probe(struct platform_device *pdev)
enable_1510_mode = d->dev_caps & ENABLE_1510_MODE;
dma_chan = devm_kcalloc(&pdev->dev, dma_lch_count,
- sizeof(struct omap_dma_lch), GFP_KERNEL);
+ sizeof(*dma_chan), GFP_KERNEL);
if (!dma_chan)
return -ENOMEM;