aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
diff options
context:
space:
mode:
authorTzung-Bi Shih2021-01-20 16:08:47 +0800
committerMark Brown2021-01-20 18:46:49 +0000
commit12295ef97078db19683d8c0a23abc6f633ef0e23 (patch)
tree60d8b2289bb0df4879c45df534b1980ecac23d58 /sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
parent4e37528a97bfffb2cd4f645c945759e76d583848 (diff)
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>
Diffstat (limited to 'sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c')
-rw-r--r--sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 72d337fc8534..8ea24b32a535 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -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,