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