Message ID | 15720439769ba94ffb65c90217392b0758b08f61.1618145369.git.christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | Accepted |
Commit | 38c694e98f6a6c8dfa48f2ba6f442363ed836efb |
Headers | show |
Series | ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()' | expand |
On Sun, Apr 11, 2021 at 02:51:06PM +0200, Christophe JAILLET wrote: > 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. These are stylistic improvements rather than bug fixes so it's probably better not to call them fixes.
Le 13/04/2021 à 14:43, Mark Brown a écrit : > On Sun, Apr 11, 2021 at 02:51:06PM +0200, Christophe JAILLET wrote: >> 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. > > These are stylistic improvements rather than bug fixes so it's probably > better not to call them fixes. > Ok, agreed. The error handling path is a no-op in such a case. What do you prefer: - you fix the subject? - I send a v2 with a new subject? - we leave it as-is as this patch is a no-op in the real world? So it doesn't really mater. CJ
On Sun, 11 Apr 2021 14:51:06 +0200, Christophe JAILLET wrote: > 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. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()' commit: 38c694e98f6a6c8dfa48f2ba6f442363ed836efb 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
On Tue, Apr 13, 2021 at 04:02:21PM +0200, Christophe JAILLET wrote: > What do you prefer: > - you fix the subject? > - I send a v2 with a new subject? > - we leave it as-is as this patch is a no-op in the real world? So it > doesn't really mater. It's fine, I already queued it - more a note for the future.
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++)
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(-)