summaryrefslogtreecommitdiff
path: root/sound/soc/intel/catpt
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2021-12-16 14:57:40 +0300
committerMark Brown <broonie@kernel.org>2021-12-17 19:20:37 +0300
commitdad492cfd24caf1b62d598555cde279bcca4755e (patch)
treeec290b2137408fa1683f8ca95ca654e4e84e06a2 /sound/soc/intel/catpt
parent2a9a72e290d4a4741e673f86b9fba9bfb319786d (diff)
downloadlinux-dad492cfd24caf1b62d598555cde279bcca4755e.tar.xz
ASoC: Intel: catpt: Reduce size of catpt_component_open()
With some improved if-logy, function's size can be reduced slightly. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211216115743.2130622-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/catpt')
-rw-r--r--sound/soc/intel/catpt/pcm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c
index ebb27daeb1c7..16146c693c08 100644
--- a/sound/soc/intel/catpt/pcm.c
+++ b/sound/soc/intel/catpt/pcm.c
@@ -595,9 +595,8 @@ static int catpt_component_open(struct snd_soc_component *component,
{
struct snd_soc_pcm_runtime *rtm = substream->private_data;
- if (rtm->dai_link->no_pcm)
- return 0;
- snd_soc_set_runtime_hwparams(substream, &catpt_pcm_hardware);
+ if (!rtm->dai_link->no_pcm)
+ snd_soc_set_runtime_hwparams(substream, &catpt_pcm_hardware);
return 0;
}