Skip to contentSkip to conversation

ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe()

PATCH In review SF Markus Elfring 3 participants 3 messages Aug 11, 2017 – Aug 16, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe()

From: Markus Elfring <[email protected]>
Date: Fri, 11 Aug 2017 11:25:41 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 sound/soc/intel/boards/mfld_machine.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/intel/boards/mfld_machine.c +1 -3
index 4e08885f37aa..6f44acfb4aae 100644
@@ -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");
Signature · 1 line
2.14.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Fri, 11 Aug 2017 11:25:41 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Quoted 26 lines
---
 sound/soc/intel/boards/mfld_machine.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/intel/boards/mfld_machine.c +1 -3
index 4e08885f37aa..6f44acfb4aae 100644
@@ -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");
Signature · 1 line
2.14.0
Signature · 1 line
~Vinod
maintainer
#2 lore raw

Applied "ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe()" to the asoc tree

In reply to SF Markus Elfring

The patch

ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe()

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 92ec46da6e35f5f7ff39741517a9466c82d1afb9 Mon Sep 17 00:00:00 2001

From: Markus Elfring <[email protected]>
Date: Fri, 11 Aug 2017 11:25:41 +0200
Subject: [PATCH] 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.

---
 sound/soc/intel/boards/mfld_machine.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/intel/boards/mfld_machine.c +1 -3
index 4e08885f37aa..6f44acfb4aae 100644
@@ -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");
Signature · 1 line
2.13.2