Skip to contentSkip to conversation

ASoC: rt721-sdca: Fix issue of warning message

PATCH In review Jack Yu 2 participants 2 messages Oct 8, 2024 – Oct 10, 2024

Subsystems (3)
lore
Share & tools
lore

Jack Yu

author
#0 lore raw

PATCH 2/2 ASoC: rt721-sdca: Fix issue of warning message

Fix issue of warning messages caused by some variables.

---
 sound/soc/codecs/rt-sdw-common.c | 2 +-
 sound/soc/codecs/rt721-sdca.c    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt-sdw-common.c +1 -1
index 9ed0e9855699..a422da6cf702 100644
@@ -108,7 +108,7 @@ EXPORT_SYMBOL_GPL(rt_sdca_index_update_bits);
 int rt_sdca_btn_type(unsigned char *buffer)
 {
 	u8 btn_type = 0;
-	int ret;
+	int ret = 0;
 
 	btn_type |= buffer[0] & 0xf;
 	btn_type |= (buffer[0] >> 4) & 0xf;
sound/soc/codecs/rt721-sdca.c +2 -2
index 36056cb7a3ca..201cb667c8c1 100644
@@ -30,7 +30,7 @@ static void rt721_sdca_jack_detect_handler(struct work_struct *work)
 {
 	struct rt721_sdca_priv *rt721 =
 		container_of(work, struct rt721_sdca_priv, jack_detect_work.work);
-	int btn_type = 0, ret;
+	int btn_type = 0;
 
 	if (!rt721->hs_jack)
 		return;
@@ -42,7 +42,7 @@ static void rt721_sdca_jack_detect_handler(struct work_struct *work)
 	if (rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_6) {
 		rt721->jack_type = rt_sdca_headset_detect(rt721->regmap,
 							RT721_SDCA_ENT_GE49);
-		if (ret < 0)
+		if (rt721->jack_type < 0)
 			return;
 	}
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 3 lines · Jack Yu

Fix issue of warning messages caused by some variables.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[2/2] ASoC: rt721-sdca: Fix issue of warning message

      commit: e5553cb6612989d18229c2b03948d6b4ba5d45f2

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