[PATCH] sound/soc/codecs: remove redundant ret variable
From: Minghao Chi chi.minghao@zte.com.cn
Return value from devm_snd_soc_register_component() directly instead of taking this in another redundant variable.
Reported-by: Zeal Robot zealci@zte.com.cn Signed-off-by: Minghao Chi chi.minghao@zte.com.cn Signed-off-by: CGEL ZTE cgel.zte@gmail.com --- sound/soc/codecs/wm8971.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 21ae55c32a6d..ddf0e2f5e66a 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -676,7 +676,6 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct wm8971_priv *wm8971; - int ret;
wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv), GFP_KERNEL); @@ -689,10 +688,8 @@ static int wm8971_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata(i2c, wm8971);
- ret = devm_snd_soc_register_component(&i2c->dev, + return devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_wm8971, &wm8971_dai, 1); - - return ret; }
static const struct i2c_device_id wm8971_i2c_id[] = {
On Mon, Jan 10, 2022 at 01:28:33AM +0000, cgel.zte@gmail.com wrote:
From: Minghao Chi chi.minghao@zte.com.cn
Return value from devm_snd_soc_register_component() directly instead of taking this in another redundant variable.
Reported-by: Zeal Robot zealci@zte.com.cn Signed-off-by: Minghao Chi chi.minghao@zte.com.cn Signed-off-by: CGEL ZTE cgel.zte@gmail.com
Acked-by: Charles Keepax ckeepax@opensource.cirrus.com
Thanks, Charles
On Mon, Jan 10, 2022 at 01:28:33AM +0000, cgel.zte@gmail.com wrote:
From: Minghao Chi chi.minghao@zte.com.cn
Return value from devm_snd_soc_register_component() directly instead of taking this in another redundant variable.
Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.
Please don't ignore review comments, people are generally making them for a reason and are likely to have the same concerns if issues remain unaddressed. Having to repeat the same comments can get repetitive and make people question the value of time spent reviewing. If you disagree with the review comments that's fine but you need to reply and discuss your concerns so that the reviewer can understand your decisions.
On Mon, 10 Jan 2022 01:28:33 +0000, cgel.zte@gmail.com wrote:
From: Minghao Chi chi.minghao@zte.com.cn
Return value from devm_snd_soc_register_component() directly instead of taking this in another redundant variable.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] sound/soc/codecs: remove redundant ret variable commit: 4ec19deec7ffae843c3445ac7d2cfcc78c56c145
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
participants (3)
-
cgel.zte@gmail.com
-
Charles Keepax
-
Mark Brown