Skip to content

Commit

Permalink
ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tzung-Bi Shih authored and Mark Brown committed Jan 20, 2021
1 parent 4e37528 commit 12295ef
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 12295ef

Please sign in to comment.