Skip to content

Commit

Permalink
ASoC: Intel: catpt: Reduce size of catpt_component_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cezary Rojewski authored and Mark Brown committed Dec 17, 2021
1 parent 2a9a72e commit dad492c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sound/soc/intel/catpt/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit dad492c

Please sign in to comment.