summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2022-06-20 12:14:00 +0200
committerMark Brown <broonie@kernel.org>2022-06-23 13:07:44 +0100
commit8fe4709962d74a19c0c1dfc877ba600101340c62 (patch)
treedbc873ba8184b5b9c75fd10cad5cbec738a67d23 /sound
parent423cc2d0e8506a0ce6e3ef1806a561de1076e033 (diff)
downloadlinux-8fe4709962d74a19c0c1dfc877ba600101340c62.tar.bz2
ASoC: Intel: bdw_rt286: Improve codec_init() quality
Drop redundant 'ret' assignemnt, stop ignoring set_jack() return value and reword local 'component' variable to 'codec' to improve readability. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220620101402.2684366-16-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/bdw_rt286.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c
index 8604b221b60d..36f984ff56c5 100644
--- a/sound/soc/intel/boards/bdw_rt286.c
+++ b/sound/soc/intel/boards/bdw_rt286.c
@@ -61,8 +61,8 @@ static const struct snd_soc_dapm_route card_routes[] = {
static int codec_link_init(struct snd_soc_pcm_runtime *rtd)
{
- struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
- int ret = 0;
+ struct snd_soc_component *codec = asoc_rtd_to_codec(rtd, 0)->component;
+ int ret;
ret = snd_soc_card_jack_new_pins(rtd->card, "Headset", SND_JACK_HEADSET | SND_JACK_BTN_0,
&card_headset, card_headset_pins,
@@ -70,8 +70,7 @@ static int codec_link_init(struct snd_soc_pcm_runtime *rtd)
if (ret)
return ret;
- snd_soc_component_set_jack(component, &card_headset, NULL);
- return 0;
+ return snd_soc_component_set_jack(codec, &card_headset, NULL);
}
static int codec_link_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,