mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
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:
parent
53189ae7aa
commit
e5553cb661
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user