--- Begin Message ---
- To: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
- Subject: Re: [PATCH next] ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe()
- From: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Mar 2023 15:13:19 +0000
- Cc: error27@xxxxxxxxx, James Schulman <james.schulman@xxxxxxxxxx>, David Rhodes <david.rhodes@xxxxxxxxxx>, Lucas Tanure <tanureal@xxxxxxxxxxxxxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Simon Trimmer <simont@xxxxxxxxxxxxxxxxxxxxx>, alsa-devel@xxxxxxxxxxxxxxxx, patches@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <20230324145535.3951689-1-harshit.m.mogalapalli@oracle.com>
- References: <20230324145535.3951689-1-harshit.m.mogalapalli@oracle.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0
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@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxxxxxxxx>
--- End Message ---