diff mbox series

[2/5] ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init

Message ID 20210120080850.699354-3-tzungbi@google.com (mailing list archive)
State Accepted
Commit 12295ef97078db19683d8c0a23abc6f633ef0e23
Headers show
Series ASoC: mediatek: mt8192-mt6359: support DP audio | expand

Commit Message

Tzung-Bi Shih Jan. 20, 2021, 8:08 a.m. UTC
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>
---
 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff mbox series

Patch

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,