ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init
Returns snd_soc_component_set_jack() directly in mt8192_rt5682_init. No need to have another block to check the return value. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120080850.699354-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
4e37528a97
commit
12295ef970
|
@ -326,13 +326,7 @@ static int mt8192_rt5682_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
|
||||
|
||||
ret = snd_soc_component_set_jack(cmpnt_codec, jack, NULL);
|
||||
if (ret) {
|
||||
dev_err(rtd->dev, "Headset Jack set failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return snd_soc_component_set_jack(cmpnt_codec, jack, NULL);
|
||||
};
|
||||
|
||||
static int mt8192_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
|
|
Loading…
Reference in New Issue