]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: OMAP: Delete an error message for a failed memory allocation in two functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 3 Oct 2017 11:10:26 +0000 (13:10 +0200)
committerTony Lindgren <tony@atomide.com>
Wed, 11 Oct 2017 18:12:53 +0000 (11:12 -0700)
Omit extra messages for a memory allocation failure in these functions.

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>
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/dmtimer.c

index 1e460b4ee3b9d591a560c8145226fe067f8b3da2..6ede0427548c2ac9afe0885c9696a4bf653370ff 100644 (file)
@@ -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) *
index 7a327bd32521c91699e9a923f96b257d4a2cba35..446ac0e3a35af755efda73930700ba08a33e27b3 100644 (file)
@@ -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);