linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: spear: Remove redundant message
@ 2017-02-25 10:33 dspmihai
  2017-02-26  8:05 ` Takashi Sakamoto
  2017-08-10 15:42 ` Applied "ASoC: spear: Delete an error message for a failed memory allocation in two functions" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: dspmihai @ 2017-02-25 10:33 UTC (permalink / raw)
  To: perex, tiwai; +Cc: lgirdwood, broonie, alsa-devel, linux-kernel, dspmihai

This was reported by checkpatch.pl

Signed-off-by: Despotovici Mihai <despotovici.mihai@gmail.com>
---
 sound/soc/spear/spdif_in.c  | 4 +---
 sound/soc/spear/spdif_out.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
index 977a078..0f3b1a8 100644
--- a/sound/soc/spear/spdif_in.c
+++ b/sound/soc/spear/spdif_in.c
@@ -216,10 +216,8 @@ static int spdif_in_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
-	if (!host) {
-		dev_warn(&pdev->dev, "kzalloc fail\n");
+	if (!host)
 		return -ENOMEM;
-	}
 
 	host->io_base = io_base;
 	host->irq = platform_get_irq(pdev, 0);
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index 0a72d52..58d5843 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -282,10 +282,8 @@ static int spdif_out_probe(struct platform_device *pdev)
 	int ret;
 
 	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
-	if (!host) {
-		dev_warn(&pdev->dev, "kzalloc fail\n");
+	if (!host)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	host->io_base = devm_ioremap_resource(&pdev->dev, res);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: spear: Remove redundant message
  2017-02-25 10:33 [PATCH] ASoC: spear: Remove redundant message dspmihai
@ 2017-02-26  8:05 ` Takashi Sakamoto
  2017-08-10 15:42 ` Applied "ASoC: spear: Delete an error message for a failed memory allocation in two functions" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2017-02-26  8:05 UTC (permalink / raw)
  To: dspmihai, perex, tiwai; +Cc: alsa-devel, broonie, lgirdwood, linux-kernel

On Feb 25 2017 19:33, dspmihai wrote:
> This was reported by checkpatch.pl
>
> Signed-off-by: Despotovici Mihai <despotovici.mihai@gmail.com>
> ---
>  sound/soc/spear/spdif_in.c  | 4 +---
>  sound/soc/spear/spdif_out.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
> index 977a078..0f3b1a8 100644
> --- a/sound/soc/spear/spdif_in.c
> +++ b/sound/soc/spear/spdif_in.c
> @@ -216,10 +216,8 @@ static int spdif_in_probe(struct platform_device *pdev)
>  		return -EINVAL;
>
>  	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
> -	if (!host) {
> -		dev_warn(&pdev->dev, "kzalloc fail\n");
> +	if (!host)

The line for dev_warn() should be kept.

>  		return -ENOMEM;
> -	}
>
>  	host->io_base = io_base;
>  	host->irq = platform_get_irq(pdev, 0);
> diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
> index 0a72d52..58d5843 100644
> --- a/sound/soc/spear/spdif_out.c
> +++ b/sound/soc/spear/spdif_out.c
> @@ -282,10 +282,8 @@ static int spdif_out_probe(struct platform_device *pdev)
>  	int ret;
>
>  	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
> -	if (!host) {
> -		dev_warn(&pdev->dev, "kzalloc fail\n");
> +	if (!host)

Ditto.

>  		return -ENOMEM;
> -	}
>
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	host->io_base = devm_ioremap_resource(&pdev->dev, res);

Takashi Sakamoto

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Applied "ASoC: spear: Delete an error message for a failed memory allocation in two functions" to the asoc tree
  2017-02-25 10:33 [PATCH] ASoC: spear: Remove redundant message dspmihai
  2017-02-26  8:05 ` Takashi Sakamoto
@ 2017-08-10 15:42 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-08-10 15:42 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Viresh Kumar, Mark Brown, perex, tiwai, dspmihai, alsa-devel,
	broonie, lgirdwood, linux-kernel, alsa-devel

The patch

   ASoC: spear: Delete an error message for a failed memory allocation in two functions

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 65d55e8a3bb2d2a98078590cfa49cd508aa80e81 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 10 Aug 2017 09:50:51 +0200
Subject: [PATCH] ASoC: spear: Delete an error message for a failed memory
 allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

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: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/spear/spdif_in.c  | 4 +---
 sound/soc/spear/spdif_out.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
index 7f32527fc3c8..01b28e59b4c0 100644
--- a/sound/soc/spear/spdif_in.c
+++ b/sound/soc/spear/spdif_in.c
@@ -216,10 +216,8 @@ static int spdif_in_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
-	if (!host) {
-		dev_warn(&pdev->dev, "kzalloc fail\n");
+	if (!host)
 		return -ENOMEM;
-	}
 
 	host->io_base = io_base;
 	host->irq = platform_get_irq(pdev, 0);
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index 0a72d52d533e..58d5843811f9 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -282,10 +282,8 @@ static int spdif_out_probe(struct platform_device *pdev)
 	int ret;
 
 	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
-	if (!host) {
-		dev_warn(&pdev->dev, "kzalloc fail\n");
+	if (!host)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	host->io_base = devm_ioremap_resource(&pdev->dev, res);
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-10 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-25 10:33 [PATCH] ASoC: spear: Remove redundant message dspmihai
2017-02-26  8:05 ` Takashi Sakamoto
2017-08-10 15:42 ` Applied "ASoC: spear: Delete an error message for a failed memory allocation in two functions" to the asoc tree 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).