* [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe(
@ 2017-08-11 9:33 SF Markus Elfring
2017-08-16 4:55 ` [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_pr Vinod Koul
2017-08-16 12:09 ` Applied "ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-08-11 9:33 UTC (permalink / raw)
To: alsa-devel, Jaroslav Kysela, Lars-Peter Clausen, Liam Girdwood,
Mark Brown, Takashi Iwai, Vinod Koul
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
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.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
sound/soc/intel/boards/mfld_machine.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c
index 4e08885f37aa..6f44acfb4aae 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");
--
2.14.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_pr
2017-08-11 9:33 [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe( SF Markus Elfring
@ 2017-08-16 4:55 ` Vinod Koul
2017-08-16 12:09 ` Applied "ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2017-08-16 4:55 UTC (permalink / raw)
To: SF Markus Elfring
Cc: alsa-devel, Jaroslav Kysela, Lars-Peter Clausen, Liam Girdwood,
Mark Brown, Takashi Iwai, LKML, kernel-janitors
On Fri, Aug 11, 2017 at 11:33:56AM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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.
Acked-By: Vinod Koul <vinod.koul@intel.com>
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> sound/soc/intel/boards/mfld_machine.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c
> index 4e08885f37aa..6f44acfb4aae 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");
> --
> 2.14.0
>
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe
2017-08-11 9:33 [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe( SF Markus Elfring
2017-08-16 4:55 ` [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_pr Vinod Koul
@ 2017-08-16 12:09 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-08-16 12:09 UTC (permalink / raw)
To: Markus Elfring
Cc: Mark Brown, alsa-devel, Jaroslav Kysela, Lars-Peter Clausen,
Liam Girdwood
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
From 92ec46da6e35f5f7ff39741517a9466c82d1afb9 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
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.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/boards/mfld_machine.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c
index 4e08885f37aa..6f44acfb4aae 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");
--
2.13.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-16 12:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 9:33 [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe( SF Markus Elfring
2017-08-16 4:55 ` [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_pr Vinod Koul
2017-08-16 12:09 ` Applied "ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).