summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-audio.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-09-30 18:20:25 +0300
committerMark Brown <broonie@kernel.org>2020-10-26 16:08:02 +0000
commit64e2c37ea03545ff926de13ce79c8df27b939d8a (patch)
treef65facc9b21a387974e63b2d745886b526e3d3fa /sound/soc/sof/sof-audio.c
parent3381a989a92f12f401332f1c506465fff1a8870d (diff)
downloadlinux-64e2c37ea03545ff926de13ce79c8df27b939d8a.tar.gz
ASoC: SOF: sof-audio: remove goto used for force-nocodec support
Address smatch warnings: sound/soc/sof/sof-audio.c:375 sof_machine_check() warn: inconsistent indenting sound/soc/sof/sof-audio.c:380 sof_machine_check() warn: ignoring unreachable code. No functionality change. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Tested-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20200930152026.3902186-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.c')
-rw-r--r--sound/soc/sof/sof-audio.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index afe7e503bf66..9a8ce25a8fc8 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -443,11 +443,7 @@ int sof_machine_check(struct snd_sof_dev *sdev)
struct snd_soc_acpi_mach *mach;
int ret;
- /* force nocodec mode */
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)
- dev_warn(sdev->dev, "Force to use nocodec mode\n");
- goto nocodec;
-#endif
+#if !IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)
/* find machine */
snd_sof_machine_select(sdev);
@@ -460,8 +456,8 @@ int sof_machine_check(struct snd_sof_dev *sdev)
dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
return -ENODEV;
#endif
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)
-nocodec:
+#else
+ dev_warn(sdev->dev, "Force to use nocodec mode\n");
#endif
/* select nocodec mode */
dev_warn(sdev->dev, "Using nocodec machine driver\n");