mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()'
@ 2021-04-11 12:51 Christophe JAILLET
  2021-04-13 12:43 ` Mark Brown
  2021-04-13 15:08 ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2021-04-11 12:51 UTC (permalink / raw)
  To: james.schulman, david.rhodes, lgirdwood, broonie, perex, tiwai
  Cc: alsa-devel, patches, linux-kernel, kernel-janitors, Christophe JAILLET

If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should
return directly as already done by the surrounding error handling paths.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 sound/soc/codecs/cs35l35.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c
index 55d529aa0011..7b9f5498f8a7 100644
--- a/sound/soc/codecs/cs35l35.c
+++ b/sound/soc/codecs/cs35l35.c
@@ -1488,7 +1488,7 @@ static int cs35l35_i2c_probe(struct i2c_client *i2c_client,
 	if (IS_ERR(cs35l35->regmap)) {
 		ret = PTR_ERR(cs35l35->regmap);
 		dev_err(dev, "regmap_init() failed: %d\n", ret);
-		goto err;
+		return ret;
 	}
 
 	for (i = 0; i < ARRAY_SIZE(cs35l35_supplies); i++)
-- 
2.27.0


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

end of thread, other threads:[~2021-04-13 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 12:51 [PATCH] ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()' Christophe JAILLET
2021-04-13 12:43 ` Mark Brown
2021-04-13 14:02   ` Christophe JAILLET
2021-04-13 16:55     ` Mark Brown
2021-04-13 15:08 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®