From: Markus Elfring Date: Fri, 11 Aug 2017 09:25:41 +0000 (+0200) Subject: ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc... X-Git-Tag: v4.14-rc4~21^2~23^2~17^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=92ec46da6e35f5f7ff39741517a9466c82d1afb9;p=platform%2Fkernel%2Flinux-exynos.git ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Acked-By: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 4e08885..6f44acf 100644 --- a/sound/soc/intel/boards/mfld_machine.c +++ b/sound/soc/intel/boards/mfld_machine.c @@ -376,10 +376,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) /* audio interrupt base of SRAM location where * interrupts are stored by System FW */ mc_drv_ctx = devm_kzalloc(&pdev->dev, sizeof(*mc_drv_ctx), GFP_ATOMIC); - if (!mc_drv_ctx) { - pr_err("allocation failed\n"); + if (!mc_drv_ctx) return -ENOMEM; - } irq_mem = platform_get_resource_byname( pdev, IORESOURCE_MEM, "IRQ_BASE");