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

Commit 16e7ea53 authored by Markus Elfring's avatar Markus Elfring Committed by Tony Lindgren
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent d679950c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -857,7 +857,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	timer = devm_kzalloc(dev, sizeof(struct omap_dm_timer), GFP_KERNEL);
	timer = devm_kzalloc(dev, sizeof(*timer), GFP_KERNEL);
	if (!timer)
		return  -ENOMEM;