linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: samsung: remove the unused variable value assignment
@ 2020-11-13 14:51 xiakaixu1987
  2020-11-14 15:49 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: xiakaixu1987 @ 2020-11-13 14:51 UTC (permalink / raw)
  To: krzk; +Cc: linux-samsung-soc, Kaixu Xia, linux-kernel, linux-arm-kernel

From: Kaixu Xia <kaixuxia@tencent.com>

The value of variable ret is overwritten by the following call
devm_snd_soc_register_card(), so here the value assignment is useless.
Remove it.

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 sound/soc/samsung/smdk_wm8994.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index 64a1a64..1db5b59 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -160,11 +160,9 @@ static int smdk_audio_probe(struct platform_device *pdev)
 		smdk_dai[0].cpus->dai_name = NULL;
 		smdk_dai[0].cpus->of_node = of_parse_phandle(np,
 				"samsung,i2s-controller", 0);
-		if (!smdk_dai[0].cpus->of_node) {
+		if (!smdk_dai[0].cpus->of_node)
 			dev_err(&pdev->dev,
 			   "Property 'samsung,i2s-controller' missing or invalid\n");
-			ret = -EINVAL;
-		}
 
 		smdk_dai[0].platforms->name = NULL;
 		smdk_dai[0].platforms->of_node = smdk_dai[0].cpus->of_node;
-- 
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ASoC: samsung: remove the unused variable value assignment
  2020-11-13 14:51 [PATCH] ASoC: samsung: remove the unused variable value assignment xiakaixu1987
@ 2020-11-14 15:49 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-14 15:49 UTC (permalink / raw)
  To: xiakaixu1987; +Cc: linux-samsung-soc, Kaixu Xia, linux-kernel, linux-arm-kernel

On Fri, Nov 13, 2020 at 10:51:19PM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
> 
> The value of variable ret is overwritten by the following call
> devm_snd_soc_register_card(), so here the value assignment is useless.
> Remove it.
> 
> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>

Where can we find the report?

> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> ---
>  sound/soc/samsung/smdk_wm8994.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
> index 64a1a64..1db5b59 100644
> --- a/sound/soc/samsung/smdk_wm8994.c
> +++ b/sound/soc/samsung/smdk_wm8994.c
> @@ -160,11 +160,9 @@ static int smdk_audio_probe(struct platform_device *pdev)
>  		smdk_dai[0].cpus->dai_name = NULL;
>  		smdk_dai[0].cpus->of_node = of_parse_phandle(np,
>  				"samsung,i2s-controller", 0);
> -		if (!smdk_dai[0].cpus->of_node) {
> +		if (!smdk_dai[0].cpus->of_node)
>  			dev_err(&pdev->dev,
>  			   "Property 'samsung,i2s-controller' missing or invalid\n");
> -			ret = -EINVAL;

This should jump to out/return instead.

Please use script get_maintainers.pl to get the list of people and
mailing lists to Cc. No one would apply this patch otherwise...

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-11-14 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 14:51 [PATCH] ASoC: samsung: remove the unused variable value assignment xiakaixu1987
2020-11-14 15:49 ` Krzysztof Kozlowski

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).