alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe()
@ 2023-03-24 14:55 Harshit Mogalapalli
  2023-03-24 15:13 ` Richard Fitzgerald via Alsa-devel
  2023-03-24 19:52 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Harshit Mogalapalli @ 2023-03-24 14:55 UTC (permalink / raw)
  Cc: error27, Harshit Mogalapalli, James Schulman, David Rhodes,
	Lucas Tanure, Richard Fitzgerald, Liam Girdwood, Mark Brown,
	Takashi Iwai, Simon Trimmer, alsa-devel, patches, linux-kernel

We have unreachable 'return ret' statement in cs35l56_spi_probe(),
delete it as its dead code..

This is found by static analysis with smatch.

Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
Only compile tested.
---
 sound/soc/codecs/cs35l56-spi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l56-spi.c b/sound/soc/codecs/cs35l56-spi.c
index 80dcf37daae2..4b2084e85f29 100644
--- a/sound/soc/codecs/cs35l56-spi.c
+++ b/sound/soc/codecs/cs35l56-spi.c
@@ -29,7 +29,6 @@ static int cs35l56_spi_probe(struct spi_device *spi)
 	if (IS_ERR(cs35l56->regmap)) {
 		ret = PTR_ERR(cs35l56->regmap);
 		return dev_err_probe(&spi->dev, ret, "Failed to allocate register map\n");
-		return ret;
 	}
 
 	cs35l56->dev = &spi->dev;
-- 
2.38.1


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

* Re: [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe()
  2023-03-24 14:55 [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe() Harshit Mogalapalli
@ 2023-03-24 15:13 ` Richard Fitzgerald via Alsa-devel
  2023-03-24 19:52 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Fitzgerald via Alsa-devel @ 2023-03-24 15:13 UTC (permalink / raw)
  To: Harshit Mogalapalli
  Cc: error27, James Schulman, David Rhodes, Lucas Tanure,
	Liam Girdwood, Mark Brown, Takashi Iwai, Simon Trimmer,
	alsa-devel, patches, linux-kernel


[-- Attachment #0: Type: message/rfc822, Size: 6056 bytes --]

From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: error27@gmail.com, James Schulman <james.schulman@cirrus.com>, David Rhodes <david.rhodes@cirrus.com>, Lucas Tanure <tanureal@opensource.cirrus.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>, Simon Trimmer <simont@opensource.cirrus.com>, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe()
Date: Fri, 24 Mar 2023 15:13:19 +0000
Message-ID: <11a0b85f-d705-145d-fc6a-1bcbb78d3686@opensource.cirrus.com>

On 24/03/2023 14:55, Harshit Mogalapalli wrote:
> We have unreachable 'return ret' statement in cs35l56_spi_probe(),
> delete it as its dead code..
> 
> This is found by static analysis with smatch.
> 
> Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> ---
> Only compile tested.
> ---
>   sound/soc/codecs/cs35l56-spi.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/cs35l56-spi.c b/sound/soc/codecs/cs35l56-spi.c
> index 80dcf37daae2..4b2084e85f29 100644
> --- a/sound/soc/codecs/cs35l56-spi.c
> +++ b/sound/soc/codecs/cs35l56-spi.c
> @@ -29,7 +29,6 @@ static int cs35l56_spi_probe(struct spi_device *spi)
>   	if (IS_ERR(cs35l56->regmap)) {
>   		ret = PTR_ERR(cs35l56->regmap);
>   		return dev_err_probe(&spi->dev, ret, "Failed to allocate register map\n");
> -		return ret;
>   	}
>   
>   	cs35l56->dev = &spi->dev;
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>

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

* Re: [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe()
  2023-03-24 14:55 [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe() Harshit Mogalapalli
  2023-03-24 15:13 ` Richard Fitzgerald via Alsa-devel
@ 2023-03-24 19:52 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-03-24 19:52 UTC (permalink / raw)
  To: Harshit Mogalapalli
  Cc: error27, James Schulman, David Rhodes, Lucas Tanure,
	Richard Fitzgerald, Liam Girdwood, Takashi Iwai, Simon Trimmer,
	alsa-devel, patches, linux-kernel

On Fri, 24 Mar 2023 07:55:35 -0700, Harshit Mogalapalli wrote:
> We have unreachable 'return ret' statement in cs35l56_spi_probe(),
> delete it as its dead code..
> 
> This is found by static analysis with smatch.
> 
> 

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe()
      commit: 283771e8eefcbe4a0a84c6a00a0b7a210bbc5846

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


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

end of thread, other threads:[~2023-03-29 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 14:55 [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe() Harshit Mogalapalli
2023-03-24 15:13 ` Richard Fitzgerald via Alsa-devel
2023-03-24 19:52 ` 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).