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

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

ARM: OMAP: Delete an error message for a failed memory allocation in two functions



Omit extra messages for a memory allocation failure in these functions.

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 10e998ff
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1317,11 +1317,8 @@ static int omap_system_dma_probe(struct platform_device *pdev)

	dma_chan = devm_kcalloc(&pdev->dev, dma_lch_count,
				sizeof(struct omap_dma_lch), GFP_KERNEL);
	if (!dma_chan) {
		dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__);
	if (!dma_chan)
		return -ENOMEM;
	}


	if (dma_omap2plus()) {
		dma_linked_lch = kzalloc(sizeof(struct dma_link_info) *
+1 −3
Original line number Diff line number Diff line
@@ -858,10 +858,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
	}

	timer = devm_kzalloc(dev, sizeof(struct omap_dm_timer), GFP_KERNEL);
	if (!timer) {
		dev_err(dev, "%s: memory alloc failed!\n", __func__);
	if (!timer)
		return  -ENOMEM;
	}

	timer->fclk = ERR_PTR(-ENODEV);
	timer->io_base = devm_ioremap_resource(dev, mem);