aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJack Yu <jack.yu@realtek.com>2024-10-08 08:57:36 +0000
committerMark Brown <broonie@kernel.org>2024-10-08 10:49:21 +0100
commite5553cb6612989d18229c2b03948d6b4ba5d45f2 (patch)
tree6096c3ff1263b12609d2974f352f0e4a83cd0af9
parentASoC: aw88399: Correct error handling in aw_dev_get_dsp_status function (diff)
downloadwireguard-linux-e5553cb6612989d18229c2b03948d6b4ba5d45f2.tar.xz
wireguard-linux-e5553cb6612989d18229c2b03948d6b4ba5d45f2.zip
ASoC: rt721-sdca: Fix issue of warning message
Fix issue of warning messages caused by some variables. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/065c0b7d84cf47d3a9186235447521c5@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/rt-sdw-common.c2
-rw-r--r--sound/soc/codecs/rt721-sdca.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/rt-sdw-common.c b/sound/soc/codecs/rt-sdw-common.c
index 9ed0e9855699..a422da6cf702 100644
--- a/sound/soc/codecs/rt-sdw-common.c
+++ b/sound/soc/codecs/rt-sdw-common.c
@@ -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;
diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c
index 36056cb7a3ca..201cb667c8c1 100644
--- a/sound/soc/codecs/rt721-sdca.c
+++ b/sound/soc/codecs/rt721-sdca.c
@@ -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;
}