aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/es8323.c2
-rw-r--r--sound/soc/codecs/rt722-sdca.c8
-rw-r--r--sound/soc/mediatek/mt8188/mt8188-dai-etdm.c5
3 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c
index c09bd92b2ed3..6f4fa36ea34d 100644
--- a/sound/soc/codecs/es8323.c
+++ b/sound/soc/codecs/es8323.c
@@ -743,7 +743,7 @@ static int es8323_i2c_probe(struct i2c_client *i2c_client)
struct device *dev = &i2c_client->dev;
es8323 = devm_kzalloc(dev, sizeof(*es8323), GFP_KERNEL);
- if (IS_ERR(es8323))
+ if (!es8323)
return -ENOMEM;
i2c_set_clientdata(i2c_client, es8323);
diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c
index e5bd9ef812de..f9f7512ca360 100644
--- a/sound/soc/codecs/rt722-sdca.c
+++ b/sound/soc/codecs/rt722-sdca.c
@@ -607,12 +607,8 @@ static int rt722_sdca_dmic_set_gain_get(struct snd_kcontrol *kcontrol,
if (!adc_vol_flag) /* boost gain */
ctl = regvalue / boost_step;
- else { /* ADC gain */
- if (adc_vol_flag)
- ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset);
- else
- ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset);
- }
+ else /* ADC gain */
+ ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset);
ucontrol->value.integer.value[i] = ctl;
}
diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
index 2a48f5fd6826..69a091dad88d 100644
--- a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
@@ -2422,7 +2422,6 @@ static int mtk_dai_hdmitx_dptx_hw_params(struct snd_pcm_substream *substream,
unsigned int channels = params_channels(params);
snd_pcm_format_t format = params_format(params);
int width = snd_pcm_format_physical_width(format);
- int ret;
if (!is_valid_etdm_dai(dai->id))
return -EINVAL;
@@ -2450,9 +2449,7 @@ static int mtk_dai_hdmitx_dptx_hw_params(struct snd_pcm_substream *substream,
etdm_data->data_mode = MTK_DAI_ETDM_DATA_MULTI_PIN;
}
- ret = mtk_dai_etdm_configure(afe, rate, channels, width, dai->id);
-
- return ret;
+ return mtk_dai_etdm_configure(afe, rate, channels, width, dai->id);
}
static int mtk_dai_hdmitx_dptx_set_sysclk(struct snd_soc_dai *dai,