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>
This commit is contained in:
Jack Yu 2024-10-08 08:57:36 +00:00 committed by Mark Brown
parent 53189ae7aa
commit e5553cb661
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}